context: parents() already filters nullid
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 01 Dec 2009 01:08:16 +0100
changeset 9974 da5209afe1bc
parent 9973 d1319ad5071b
child 9975 2e67734e1453
context: parents() already filters nullid
mercurial/context.py
--- a/mercurial/context.py	Tue Dec 01 01:03:54 2009 +0100
+++ b/mercurial/context.py	Tue Dec 01 01:08:16 2009 +0100
@@ -439,12 +439,11 @@
         for f in sorted(visit, key=lambda x: x.rev()):
             curr = decorate(f.data(), f)
             for p in parents(f):
-                if p != nullid:
-                    curr = pair(hist[p], curr)
-                    # trim the history of unneeded revs
-                    needed[p] -= 1
-                    if not needed[p]:
-                        del hist[p]
+                curr = pair(hist[p], curr)
+                # trim the history of unneeded revs
+                needed[p] -= 1
+                if not needed[p]:
+                    del hist[p]
             hist[f] = curr
 
         return zip(hist[f][0], hist[f][1].splitlines(True))