mercurial/context.py
changeset 18993 0fd0612dc855
parent 18992 a54ddfae8907
child 19061 36067f5baf24
--- a/mercurial/context.py	Fri Mar 29 22:57:15 2013 +0900
+++ b/mercurial/context.py	Fri Mar 29 22:57:16 2013 +0900
@@ -689,7 +689,8 @@
         needed = {base: 1}
         while visit:
             f = visit[-1]
-            if f not in pcache:
+            pcached = f in pcache
+            if not pcached:
                 pcache[f] = parents(f)
 
             ready = True
@@ -698,6 +699,7 @@
                 if p not in hist:
                     ready = False
                     visit.append(p)
+                if not pcached:
                     needed[p] = needed.get(p, 0) + 1
             if ready:
                 visit.pop()