changeset 18467:e441657b372b stable

graphmod: don't try to visit nullrev (issue3772)
author Bryan O'Sullivan <bryano@fb.com>
date Wed, 23 Jan 2013 00:20:26 -0600
parents ac0c12123743
children 275224c6e89c
files mercurial/graphmod.py tests/test-glog.t
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/graphmod.py	Wed Jan 23 00:12:52 2013 -0600
+++ b/mercurial/graphmod.py	Wed Jan 23 00:20:26 2013 -0600
@@ -181,7 +181,7 @@
     ncols = len(seen)
     nextseen = seen[:]
     nextseen[nodeidx:nodeidx + 1] = newparents
-    edges = [(nodeidx, nextseen.index(p)) for p in knownparents]
+    edges = [(nodeidx, nextseen.index(p)) for p in knownparents if p != nullrev]
 
     while len(newparents) > 2:
         # ascii() only knows how to add or remove a single column between two
--- a/tests/test-glog.t	Wed Jan 23 00:12:52 2013 -0600
+++ b/tests/test-glog.t	Wed Jan 23 00:20:26 2013 -0600
@@ -2109,4 +2109,12 @@
   o
   
 
+issue3772
+
+  $ hg glog -r :null
+  o  changeset:   -1:000000000000
+     user:
+     date:        Thu Jan 01 00:00:00 1970 +0000
+  
+
   $ cd ..