hgview #8399 mercurial 1.2 compatibility [validation pending]
Has anyone else tried hgview (http://www.logilab.org/project/hgview) under Mercurial 1.2? It's not showing log messages for me. And it prints this stack trace many many times: Traceback (most recent call last): File "/home/scratch/src/hgview/build/lib/hgview/gtk/graphrenderer.py",line 203, in on_render node_branches = self.app.get_node_branches() File "/home/scratch/src/hgview/build/lib/hgview/gtk/hgview_gtk.py", line 160, in get_node_branches node_info = self.repo.read_node(node) File "/home/scratch/src/hgview/build/lib/hgview/hgrepo.py", line 181, in read_node if node in nodeinfo: TypeError: list objects are unhashable If I downgrade back to 1.1.2, both problems go away. (reported by Greg Ward on the Mercurial mailing list) | |
priority | important |
---|---|
type | bug |
done in | 0.11.0 |
load | 1.500 |
load left | 0.000 |
closed by | <not specified> |
Comments
-
2009/03/12 12:22, written by anon
-
2009/03/12 12:23, written by anon
Sorry about the formatting.
-
2009/03/25 02:00, written by anon
add commentI don't know Python, so I *know* this isn't the "correct" solution, but it works for me:
--- a/hgview/hgrepo.py Mon Mar 02 08:37:31 2009 +0100
+++ b/hgview/hgrepo.py Thu Mar 12 08:21:37 2009 -0400
@@ -182,6 +182,8 @@
def read_node( self, node ):
"""Gather revision information from mercurial"""
nodeinfo = self._cache
+ if node.__class__ == list:
+ node = node[0]
if node in nodeinfo:
return nodeinfo[node]
NCOLORS = len(COLORS)
I guess you know some python because your patch works