Mercurial > hg-stable
changeset 18376:13d73bf6be29
convert: make toposort order stable when multiple orderings are possible
The output of some tests are changed. Not necessarily to the better, just other
valid permutations.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 13 Dec 2012 23:15:51 +0100 |
parents | cfbd33020066 |
children | 56b805306955 |
files | hgext/convert/convcmd.py tests/test-convert-cvs-detectmerge.t tests/test-convert-cvs.t tests/test-convert-svn-move.t |
diffstat | 4 files changed, 23 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/convcmd.py Tue Jan 15 02:59:14 2013 +0100 +++ b/hgext/convert/convcmd.py Thu Dec 13 23:15:51 2012 +0100 @@ -175,7 +175,7 @@ revisions without parents. 'parents' must be a mapping of revision identifier to its parents ones. """ - visit = parents.keys() + visit = sorted(parents) seen = set() children = {} roots = []
--- a/tests/test-convert-cvs-detectmerge.t Tue Jan 15 02:59:14 2013 +0100 +++ b/tests/test-convert-cvs-detectmerge.t Thu Dec 13 23:15:51 2012 +0100 @@ -183,8 +183,8 @@ sorting... converting... 9 add file1 on trunk - 8 add text - 7 unrelated change + 8 unrelated change + 7 add text 6 add text [MERGE from v1_0] 5 add text [MERGE from v1_1] 4 add file2 on trunk @@ -204,8 +204,8 @@ 5: '' add file2 on trunk 4: '' add text [MERGE from v1_1] 3: 'v1_1' add text [MERGE from v1_0] - 2: 'v1_1' unrelated change - 1: 'v1_0' add text + 2: 'v1_0' add text + 1: 'v1_1' unrelated change 0: '' add file1 on trunk graphical log @@ -225,9 +225,9 @@ |\| | o 3: 'v1_1' add text [MERGE from v1_0] | |\ - +---o 2: 'v1_1' unrelated change + +---o 2: 'v1_0' add text | | - | o 1: 'v1_0' add text + | o 1: 'v1_1' unrelated change |/ o 0: '' add file1 on trunk
--- a/tests/test-convert-cvs.t Tue Jan 15 02:59:14 2013 +0100 +++ b/tests/test-convert-cvs.t Thu Dec 13 23:15:51 2012 +0100 @@ -91,8 +91,8 @@ sorting... converting... 2 Initial revision - 1 import - 0 ci0 + 1 ci0 + 0 import updating tags $ hgcat a a @@ -116,10 +116,10 @@ sorting... converting... 2 Initial revision - 1 import + 1 ci0 + 0 import filtering out empty revision - repository tip rolled back to revision 0 (undo commit) - 0 ci0 + repository tip rolled back to revision 1 (undo commit) updating tags $ hgcat b/c c @@ -321,9 +321,9 @@ | o 3 () update tags date: * +0000 files: .hgtags (glob) | - o 2 () ci0 date: * -1000 files: b/c (glob) - | - | o 1 (INITIAL) import date: * -1000 files: (glob) + | o 2 (INITIAL) import date: * -1000 files: (glob) + | | + o | 1 () ci0 date: * -1000 files: b/c (glob) |/ o 0 () Initial revision date: * -1000 files: a b/c (glob)
--- a/tests/test-convert-svn-move.t Tue Jan 15 02:59:14 2013 +0100 +++ b/tests/test-convert-svn-move.t Thu Dec 13 23:15:51 2012 +0100 @@ -100,8 +100,8 @@ 4 clobber1 3 clobber2 2 adddb - 1 branch - 0 clobberdir + 1 clobberdir + 0 branch $ cd hg-repo @@ -210,9 +210,7 @@ \r (no-eol) (esc) \r (no-eol) (esc) converting [=============================> ] 5/7\r (no-eol) (esc) - scanning paths [ ] 0/3\r (no-eol) (esc) - scanning paths [===========> ] 1/3\r (no-eol) (esc) - scanning paths [========================> ] 2/3\r (no-eol) (esc) + scanning paths [ ] 0/1\r (no-eol) (esc) getting files [===> ] 1/8\r (no-eol) (esc) getting files [========> ] 2/8\r (no-eol) (esc) getting files [=============> ] 3/8\r (no-eol) (esc) @@ -224,7 +222,9 @@ \r (no-eol) (esc) \r (no-eol) (esc) converting [===================================> ] 6/7\r (no-eol) (esc) - scanning paths [ ] 0/1\r (no-eol) (esc) + scanning paths [ ] 0/3\r (no-eol) (esc) + scanning paths [===========> ] 1/3\r (no-eol) (esc) + scanning paths [========================> ] 2/3\r (no-eol) (esc) getting files [===> ] 1/8\r (no-eol) (esc) getting files [========> ] 2/8\r (no-eol) (esc) getting files [=============> ] 3/8\r (no-eol) (esc) @@ -243,7 +243,7 @@ 4 clobber1 3 clobber2 2 adddb - 1 branch - 0 clobberdir + 1 clobberdir + 0 branch $ cd ..