changeset 18456:8a811fa9a9c0 stable

merge: only sort manifests in debug mode (issue3769)
author Matt Mackall <mpm@selenic.com>
date Sun, 20 Jan 2013 17:18:00 -0600
parents 28aaa24dc36b
children 7c2af3954d29 9354a8c1bded
files mercurial/merge.py
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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