[PATCH 01 of 24] copies: make the loss in _backwardcopies more stable
Mads Kiilerich
mads at kiilerich.com
Sun Dec 16 16:33:56 CST 2012
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1355687455 -3600
# Node ID 36ef75411e38e3cc4b60198ec20750b87b0a7545
# Parent 8c9a52492d426741ab24392d49f44a1d4f23613e
copies: make the loss in _backwardcopies more stable
A couple of tests shows slightly more correct output. That is pure coincidence.
diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -150,7 +150,7 @@
# in particular, we find renames better than copies
f = _forwardcopies(b, a)
r = {}
- for k, v in f.iteritems():
+ for k, v in sorted(f.iteritems()):
r[v] = k
return r
diff --git a/tests/test-git-export.t b/tests/test-git-export.t
--- a/tests/test-git-export.t
+++ b/tests/test-git-export.t
@@ -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 @@
-
diff --git a/tests/test-mv-cp-st-diff.t b/tests/test-mv-cp-st-diff.t
--- a/tests/test-mv-cp-st-diff.t
+++ b/tests/test-mv-cp-st-diff.t
@@ -1072,7 +1072,7 @@
% hg st -C --rev . --rev 0
M a
- b
+ c
R b
R c
@@ -1148,7 +1148,7 @@
% hg st -C --rev . --rev 2
M a
- b
+ c
A x/y
R b
R c
More information about the Mercurial-devel
mailing list