merge: only sort manifests in debug mode (issue3769) stable
authorMatt Mackall <mpm@selenic.com>
Sun, 20 Jan 2013 17:18:00 -0600
branchstable
changeset 18456 8a811fa9a9c0
parent 18455 28aaa24dc36b
child 18457 7c2af3954d29
child 18458 9354a8c1bded
merge: only sort manifests in debug mode (issue3769)
mercurial/merge.py
--- a/mercurial/merge.py	Sat Jan 19 17:26:19 2013 -0600
+++ b/mercurial/merge.py	Sun Jan 20 17:18:00 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