[Python-projects] hgview gives ValueError: list.remove(x): x not in list when clicking on certain changesets

Hunter Blanks hunter.blanks at veritat.com
Tue Apr 14 05:39:17 CEST 2009


Dear hgview folks,

First, thanks to everyone who's worked on hgview! I think it's a great
improvement on the old tk tool.

I came across a funny bug while viewing my repository, and since I
wasn't too sure how best to ticket it, I'm passing the traceback and
some of the diff your way.  Basically, hgview fails to show the diff and
files changed for a pretty simple changeset I have.  (hgk, however,
works) In this particular changeset, I had done ``hg cp`` to copy one
file to another place, and also made a tiny change to another existing
file.

Anyway, here's the traceback:

    Traceback (most recent call last):
      File "/usr/lib/python2.5/site-packages/hgview/gtk/hgview_gtk.py", line 652, in selection_changed
        diffmsg, buff, changes = self.repo.diff(self.repo.parents(node), node, rnode.files)
      File "/usr/lib/python2.5/site-packages/hgview/hgrepo.py", line 250, in diff
        files.remove(m[0])
    ValueError: list.remove(x): x not in list

and a diff (some company code -- in Ruby, alas -- has been removed):

    diff -r 61bcdd922267 -r ff0431760ac1 app/views/assessments/show_confirm.html.erb
    --- a/app/views/assessments/show_confirm.html.erb       Mon Apr 13 22:49:47 2009 -0400
    +++ b/app/views/assessments/show_confirm.html.erb       Mon Apr 13 23:12:20 2009 -0400
    @@ -55,7 +55,7 @@
       href="#">See demo</a>).<br /> </p>
     <p> <%= @advisor.name %> will then call you at the phone
       number <%= @meeting.phone_number %>.
    -  <a href="<% url_for(:action => 'show_initial_meeting')
    +  <a href="<%= url_for(:action => 'show_initial_meeting')
         %>" >(click here to change your meeting time or phone
         number)</a>
     </p>
    diff -r 61bcdd922267 -r ff0431760ac1 db/fixtures/production/initial_accounts.rb
    --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
    +++ b/db/fixtures/production/initial_accounts.rb        Mon Apr 13 23:12:20 2009 -0400
    @@ -0,0 +1,86 @@
    +# a few initial accounts

Naturally, when I first got this error using the Debian package (thanks for
that, too!), I cloned the hgview repository and tried it, but I got the same
error there.

I'm sorry not to debug this myself (the deadlines at my work never seem
to end) but am happy to provide any further information.  I can write
again I succeed in reproducing it elsewhere.

Best wishes,

Hunter Blanks


-- 

Hunter Blanks
System Administrator, Veritat Advisors
hunter.blanks at veritat.com




More information about the Python-Projects mailing list