copies: make the loss in _backwardcopies more stable
authorMads Kiilerich <mads@kiilerich.com>
Tue, 15 Jan 2013 02:59:12 +0100
changeset 18355 2330d97e7707
parent 18354 cf5c76017e11
child 18356 752f77ef7202
copies: make the loss in _backwardcopies more stable A couple of tests shows slightly more correct output. That is pure coincidence.
mercurial/copies.py
tests/test-git-export.t
--- a/mercurial/copies.py	Tue Jan 15 01:10:08 2013 +0100
+++ b/mercurial/copies.py	Tue Jan 15 02:59:12 2013 +0100
@@ -151,7 +151,7 @@
     # arbitrarily pick one of the renames.
     f = _forwardcopies(b, a)
     r = {}
-    for k, v in f.iteritems():
+    for k, v in sorted(f.iteritems()):
         # remove copies
         if v in a:
             continue
--- a/tests/test-git-export.t	Tue Jan 15 01:10:08 2013 +0100
+++ b/tests/test-git-export.t	Tue Jan 15 02:59:12 2013 +0100
@@ -337,12 +337,12 @@
 Reversed:
 
   $ hg diff --git -r -1 -r -2
-  diff --git a/brand-new3 b/brand-new2
-  rename from brand-new3
+  diff --git a/brand-new3-2 b/brand-new2
+  rename from brand-new3-2
   rename to brand-new2
-  diff --git a/brand-new3-2 b/brand-new3-2
+  diff --git a/brand-new3 b/brand-new3
   deleted file mode 100644
-  --- a/brand-new3-2
+  --- a/brand-new3
   +++ /dev/null
   @@ -1,1 +0,0 @@
   -