[PATCH 0 of 6] Bug 3769 - 760c0d67ce5e regressed rebase perf by 25%

Matt Mackall mpm at selenic.com
Sun Jan 20 15:49:26 CST 2013


On Sun, 2013-01-20 at 14:18 +0100, Mads Kiilerich wrote:
> This fix is perhaps a bit too big for stable, but it has the advantage of being
> steps in the right direction and not just workarounds.

Something like this is a good step for 2.6, and advances several of my
goals for merge and resolve. But I'd rather just do this for now, which
has passed a few test runs here:

diff -r 28aaa24dc36b mercurial/merge.py
--- a/mercurial/merge.py	Sat Jan 19 17:26:19 2013 -0600
+++ b/mercurial/merge.py	Sun Jan 20 15:39:08 2013 -0600
@@ -228,7 +228,10 @@
                 break
 
     # Compare manifests
-    for f, n in sorted(m1.iteritems()):
+    visit = m1.iteritems()
+    if repo.ui.debugflag:
+        visit = sorted(visit)
+    for f, n in visit:
         if partial and not partial(f):
             continue
         if f in m2:
@@ -274,7 +277,10 @@
             else:
                 act("other deleted", "r", f)
 
-    for f, n in sorted(m2.iteritems()):
+    visit = m2.iteritems()
+    if repo.ui.debugflag:
+        visit = sorted(visit)
+    for f, n in visit:
         if partial and not partial(f):
             continue
         if f in m1 or f in copied: # files already visited


-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list