changeset 4746:62c56d8f368b

Fix revlog.children so the real children of the null revision can be calculated.
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 03 Jul 2007 12:45:33 +0200
parents e21a0e12ff10
children 452d171a1b39 7cd8a00d08de
files mercurial/revlog.py
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Tue Jul 03 03:06:40 2007 -0300
+++ b/mercurial/revlog.py	Tue Jul 03 12:45:33 2007 +0200
@@ -756,9 +756,13 @@
         c = []
         p = self.rev(node)
         for r in range(p + 1, self.count()):
-            for pr in self.parentrevs(r):
-                if pr == p:
-                    c.append(self.node(r))
+            prevs = [pr for pr in self.parentrevs(r) if pr != nullrev]
+            if prevs:
+                for pr in prevs:
+                    if pr == p:
+                        c.append(self.node(r))
+            elif p == nullrev:
+                c.append(self.node(r))
         return c
 
     def _match(self, id):