mercurial/context.py
changeset 18992 a54ddfae8907
parent 18986 2f7186400a07
child 18993 0fd0612dc855
--- a/mercurial/context.py	Wed Apr 17 00:29:54 2013 +0400
+++ b/mercurial/context.py	Fri Mar 29 22:57:15 2013 +0900
@@ -701,9 +701,14 @@
                     needed[p] = needed.get(p, 0) + 1
             if ready:
                 visit.pop()
-                curr = decorate(f.data(), f)
+                reusable = f in hist
+                if reusable:
+                    curr = hist[f]
+                else:
+                    curr = decorate(f.data(), f)
                 for p in pl:
-                    curr = pair(hist[p], curr)
+                    if not reusable:
+                        curr = pair(hist[p], curr)
                     if needed[p] == 1:
                         del hist[p]
                     else: