annotate tests/test-convert-splicemap.t @ 16106:d75aa756149b stable

convert: use splicemap entries when sorting revisions (issue1748) When sorting revisions before converting them, we have to edit the revision graph using splicemap entries. Otherwise, a spliced revision may be converted before its synthetic parents. Invalid splicemap revisions are now detected before starting the conversion.
author Patrick Mezard <patrick@mezard.eu>
date Fri, 10 Feb 2012 22:34:13 +0100
parents ebaa0aa749e2
children d554a3dcae5a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8047
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
1
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
2 $ echo "[extensions]" >> $HGRCPATH
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
3 $ echo "convert=" >> $HGRCPATH
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
4 $ echo 'graphlog =' >> $HGRCPATH
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
5 $ glog()
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
6 > {
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
7 > hg glog --template '{rev}:{node|short} "{desc|firstline}"\
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
8 > files: {files}\n' "$@"
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
9 > }
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
10 $ hg init repo1
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
11 $ cd repo1
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
12 $ echo a > a
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
13 $ hg ci -Am adda
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
14 adding a
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
15 $ echo b > b
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
16 $ echo a >> a
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
17 $ hg ci -Am addb
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
18 adding b
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
19 $ PARENTID1=`hg id --debug -i`
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
20 $ echo c > c
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
21 $ hg ci -Am addc
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
22 adding c
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
23 $ PARENTID2=`hg id --debug -i`
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
24 $ cd ..
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
25 $ glog -R repo1
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
26 @ 2:e55c719b85b6 "addc" files: c
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
27 |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
28 o 1:6d4c2037ddc2 "addb" files: a b
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
29 |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
30 o 0:07f494440405 "adda" files: a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
31
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
32
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
33 $ hg init repo2
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
34 $ cd repo2
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
35 $ echo b > a
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
36 $ echo d > d
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
37 $ hg ci -Am addaandd
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
38 adding a
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
39 adding d
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
40 $ CHILDID1=`hg id --debug -i`
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
41 $ echo d >> d
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
42 $ hg ci -Am changed
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
43 $ CHILDID2=`hg id --debug -i`
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
44 $ echo e > e
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
45 $ hg ci -Am adde
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
46 adding e
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
47 $ cd ..
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
48 $ glog -R repo2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
49 @ 2:a39b65753b0a "adde" files: e
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
50 |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
51 o 1:e4ea00df9189 "changed" files: d
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
52 |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
53 o 0:527cdedf31fb "addaandd" files: a d
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
54
8047
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
55
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
56 test invalid splicemap
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
57
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
58 $ cat > splicemap <<EOF
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
59 > $CHILDID2
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
60 > EOF
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
61 $ hg convert --splicemap splicemap repo2 repo1
16105
ebaa0aa749e2 convert: turn splicemap into a simple dictionary
Patrick Mezard <patrick@mezard.eu>
parents: 15608
diff changeset
62 abort: syntax error in splicemap(1): child parent1[,parent2] expected
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
63 [255]
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
64
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
65 splice repo2 on repo1
8047
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
66
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
67 $ cat > splicemap <<EOF
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
68 > $CHILDID1 $PARENTID1
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
69 > $CHILDID2 $PARENTID2,$CHILDID1
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
70 > EOF
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
71 $ cat splicemap
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
72 527cdedf31fbd5ea708aa14eeecf53d4676f38db 6d4c2037ddc2cb2627ac3a244ecce35283268f8e
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
73 e4ea00df91897da3079a10fab658c1eddba6617b e55c719b85b60e5102fac26110ba626e7cb6b7dc,527cdedf31fbd5ea708aa14eeecf53d4676f38db
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
74 $ hg clone repo1 target1
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
75 updating to branch default
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
76 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
77 $ hg convert --splicemap splicemap repo2 target1
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
78 scanning source...
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
79 sorting...
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
80 converting...
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
81 2 addaandd
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
82 spliced in ['6d4c2037ddc2cb2627ac3a244ecce35283268f8e'] as parents of 527cdedf31fbd5ea708aa14eeecf53d4676f38db
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
83 1 changed
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
84 spliced in ['e55c719b85b60e5102fac26110ba626e7cb6b7dc', '527cdedf31fbd5ea708aa14eeecf53d4676f38db'] as parents of e4ea00df91897da3079a10fab658c1eddba6617b
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
85 0 adde
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
86 $ glog -R target1
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
87 o 5:16bc847b02aa "adde" files: e
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
88 |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
89 o 4:e30e4fee3418 "changed" files: d
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
90 |\
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
91 | o 3:e673348c3a3c "addaandd" files: a d
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
92 | |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
93 @ | 2:e55c719b85b6 "addc" files: c
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
94 |/
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
95 o 1:6d4c2037ddc2 "addb" files: a b
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
96 |
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
97 o 0:07f494440405 "adda" files: a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
98
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
99
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
100
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
101
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
102 Test splicemap and conversion order
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
103
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
104 $ hg init ordered
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
105 $ cd ordered
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
106 $ echo a > a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
107 $ hg ci -Am adda
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
108 adding a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
109 $ hg branch branch
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
110 marked working directory as branch branch
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
111 (branches are permanent and global, did you want a bookmark?)
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
112 $ echo a >> a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
113 $ hg ci -Am changea
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
114 $ echo a >> a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
115 $ hg ci -Am changeaagain
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
116 $ hg up 0
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
118 $ echo b > b
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
119 $ hg ci -Am addb
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
120 adding b
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
121
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
122 We want 2 to depend on 1 and 3. Since 3 is always converted after 2,
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
123 the bug should be exhibited with all conversion orders.
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
124
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
125 $ cat > ../splicemap <<EOF
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
126 > $(hg id -r 2 -i --debug) $(hg id -r 1 -i --debug),$(hg id -r 3 -i --debug)
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
127 > EOF
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
128 $ cd ..
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
129 $ cat splicemap
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
130 7c364e7fa7d70ae525610c016317ed717b519d97 717d54d67e6c31fd75ffef2ff3042bdd98418437,102a90ea7b4a3361e4082ed620918c261189a36a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
131
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
132 Test regular conversion
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
133
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
134 $ hg convert --splicemap splicemap ordered ordered-hg1
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
135 initializing destination ordered-hg1 repository
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
136 scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
137 sorting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
138 converting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
139 3 adda
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
140 2 changea
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
141 1 addb
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
142 0 changeaagain
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
143 spliced in ['717d54d67e6c31fd75ffef2ff3042bdd98418437', '102a90ea7b4a3361e4082ed620918c261189a36a'] as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
144 $ glog -R ordered-hg1
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
145 o 3:4cb04b9afbf2 "changeaagain" files: a
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
146 |\
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
147 | o 2:102a90ea7b4a "addb" files: b
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
148 | |
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
149 o | 1:717d54d67e6c "changea" files: a
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
150 |/
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
151 o 0:07f494440405 "adda" files: a
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
152
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
153
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
154 Test conversion with parent revisions already in dest, using source
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
155 and destination identifiers. Test unknown splicemap target.
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
156
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
157 $ hg convert -r1 ordered ordered-hg2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
158 initializing destination ordered-hg2 repository
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
159 scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
160 sorting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
161 converting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
162 1 adda
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
163 0 changea
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
164 $ hg convert -r3 ordered ordered-hg2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
165 scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
166 sorting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
167 converting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
168 0 addb
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
169 $ cat > splicemap <<EOF
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
170 > $(hg -R ordered id -r 2 -i --debug) \
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
171 > $(hg -R ordered-hg2 id -r 1 -i --debug),\
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
172 > $(hg -R ordered-hg2 id -r 2 -i --debug)
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
173 > deadbeef102a90ea7b4a3361e4082ed620918c26 deadbeef102a90ea7b4a3361e4082ed620918c27
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
174 > EOF
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
175 $ hg convert --splicemap splicemap ordered ordered-hg2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
176 scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
177 splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
178 sorting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
179 converting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
180 0 changeaagain
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
181 spliced in ['717d54d67e6c31fd75ffef2ff3042bdd98418437', '102a90ea7b4a3361e4082ed620918c261189a36a'] as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
182 $ glog -R ordered-hg2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
183 o 3:4cb04b9afbf2 "changeaagain" files: a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
184 |\
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
185 | o 2:102a90ea7b4a "addb" files: b
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
186 | |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
187 o | 1:717d54d67e6c "changea" files: a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
188 |/
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
189 o 0:07f494440405 "adda" files: a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
190
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
191
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
192 Test empty conversion
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
193
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
194 $ hg convert --splicemap splicemap ordered ordered-hg2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
195 scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
196 splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
197 sorting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
198 converting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
199
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
200 Test clonebranches
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
201
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
202 $ hg --config convert.hg.clonebranches=true convert \
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
203 > --splicemap splicemap ordered ordered-hg3
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
204 initializing destination ordered-hg3 repository
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
205 scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
206 abort: revision 717d54d67e6c31fd75ffef2ff3042bdd98418437 not be found in destination repository (lookups with clonebranches=true are not implemented)
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
207 [255]
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
208
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
209 Test invalid dependency
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
210
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
211 $ cat > splicemap <<EOF
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
212 > $(hg -R ordered id -r 2 -i --debug) \
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
213 > deadbeef102a90ea7b4a3361e4082ed620918c26,\
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
214 > $(hg -R ordered-hg2 id -r 2 -i --debug)
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
215 > EOF
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
216 $ hg convert --splicemap splicemap ordered ordered-hg4
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
217 initializing destination ordered-hg4 repository
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
218 scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
219 abort: unknown splice map parent: deadbeef102a90ea7b4a3361e4082ed620918c26
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
220 [255]