Show More
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -0,0 +1,44 b'' | |||
|
1 | #!/bin/bash | |
|
2 | hg init rebase | |
|
3 | cd rebase | |
|
4 | ||
|
5 | # @ 7: 'H' | |
|
6 | # | | |
|
7 | # | o 6: 'G' | |
|
8 | # |/| | |
|
9 | # o | 5: 'F' | |
|
10 | # | | | |
|
11 | # | o 4: 'E' | |
|
12 | # |/ | |
|
13 | # | o 3: 'D' | |
|
14 | # | | | |
|
15 | # | o 2: 'C' | |
|
16 | # | | | |
|
17 | # | o 1: 'B' | |
|
18 | # |/ | |
|
19 | # o 0: 'A' | |
|
20 | ||
|
21 | echo A > A | |
|
22 | hg ci -Am A | |
|
23 | echo B > B | |
|
24 | hg ci -Am B | |
|
25 | echo C > C | |
|
26 | hg ci -Am C | |
|
27 | echo D > D | |
|
28 | hg ci -Am D | |
|
29 | hg up -q -C 0 | |
|
30 | echo E > E | |
|
31 | hg ci -Am E | |
|
32 | hg up -q -C 0 | |
|
33 | echo F > F | |
|
34 | hg ci -Am F | |
|
35 | hg merge -r 4 | |
|
36 | hg ci -m G | |
|
37 | hg up -q -C 5 | |
|
38 | echo H > H | |
|
39 | hg ci -Am H | |
|
40 | ||
|
41 | hg bundle -a ../rebase.hg | |
|
42 | ||
|
43 | cd .. | |
|
44 | rm -Rf rebase |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -0,0 +1,32 b'' | |||
|
1 | #!/bin/bash | |
|
2 | hg init remote | |
|
3 | cd remote | |
|
4 | ||
|
5 | echo "0" >> afile | |
|
6 | hg add afile | |
|
7 | hg commit -m "0.0" | |
|
8 | echo "1" >> afile | |
|
9 | hg commit -m "0.1" | |
|
10 | echo "2" >> afile | |
|
11 | hg commit -m "0.2" | |
|
12 | echo "3" >> afile | |
|
13 | hg commit -m "0.3" | |
|
14 | hg update -C 0 | |
|
15 | echo "1" >> afile | |
|
16 | hg commit -m "1.1" | |
|
17 | echo "2" >> afile | |
|
18 | hg commit -m "1.2" | |
|
19 | echo "a line" > fred | |
|
20 | echo "3" >> afile | |
|
21 | hg add fred | |
|
22 | hg commit -m "1.3" | |
|
23 | hg mv afile adifferentfile | |
|
24 | hg commit -m "1.3m" | |
|
25 | hg update -C 3 | |
|
26 | hg mv afile anotherfile | |
|
27 | hg commit -m "0.3m" | |
|
28 | ||
|
29 | hg bundle -a ../remote.hg | |
|
30 | ||
|
31 | cd .. | |
|
32 | rm -Rf remote |
|
1 | NO CONTENT: file renamed from tests/darcs1.hg to tests/bundles/darcs1.hg |
|
1 | NO CONTENT: file renamed from tests/legacy-encoding.hg to tests/bundles/legacy-encoding.hg |
|
1 | NO CONTENT: file renamed from tests/tampered.hg to tests/bundles/tampered.hg |
|
1 | NO CONTENT: file renamed from tests/test-keyword.hg to tests/bundles/test-keyword.hg |
|
1 | NO CONTENT: file renamed from tests/test-manifest.hg to tests/bundles/test-manifest.hg |
|
1 | NO CONTENT: file renamed from tests/test-merge-symlinks.hg to tests/bundles/test-merge-symlinks.hg |
|
1 | NO CONTENT: file renamed from tests/test-no-symlinks.hg to tests/bundles/test-no-symlinks.hg |
@@ -33,7 +33,7 b' unbundle tampered bundle' | |||
|
33 | 33 | |
|
34 | 34 | $ hg init target |
|
35 | 35 | $ cd target |
|
36 | $ hg unbundle $TESTDIR/tampered.hg | |
|
36 | $ hg unbundle $TESTDIR/bundles/tampered.hg | |
|
37 | 37 | adding changesets |
|
38 | 38 | adding manifests |
|
39 | 39 | adding file changes |
@@ -1,62 +1,15 b'' | |||
|
1 | 1 | $ hg init test |
|
2 | 2 | $ cd test |
|
3 | $ echo "0" >> afile | |
|
4 | $ hg add afile | |
|
5 | $ hg commit -m "0.0" | |
|
6 | $ echo "1" >> afile | |
|
7 | $ hg commit -m "0.1" | |
|
8 | $ echo "2" >> afile | |
|
9 | $ hg commit -m "0.2" | |
|
10 | $ echo "3" >> afile | |
|
11 | $ hg commit -m "0.3" | |
|
12 | $ hg update -C 0 | |
|
3 | $ hg unbundle $TESTDIR/bundles/remote.hg | |
|
4 | adding changesets | |
|
5 | adding manifests | |
|
6 | adding file changes | |
|
7 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
|
8 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
9 | $ hg up tip | |
|
13 | 10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | $ echo "1" >> afile | |
|
15 | $ hg commit -m "1.1" | |
|
16 | created new head | |
|
17 | $ echo "2" >> afile | |
|
18 | $ hg commit -m "1.2" | |
|
19 | $ echo "a line" > fred | |
|
20 | $ echo "3" >> afile | |
|
21 | $ hg add fred | |
|
22 | $ hg commit -m "1.3" | |
|
23 | $ hg mv afile adifferentfile | |
|
24 | $ hg commit -m "1.3m" | |
|
25 | $ hg update -C 3 | |
|
26 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
|
27 | $ hg mv afile anotherfile | |
|
28 | $ hg commit -m "0.3m" | |
|
29 | $ hg debugindex .hg/store/data/afile.i | |
|
30 | rev offset length base linkrev nodeid p1 p2 | |
|
31 | 0 0 3 0 0 362fef284ce2 000000000000 000000000000 | |
|
32 | 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000 | |
|
33 | 2 8 7 2 2 4c982badb186 125144f7e028 000000000000 | |
|
34 | 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000 | |
|
35 | $ hg debugindex .hg/store/data/adifferentfile.i | |
|
36 | rev offset length base linkrev nodeid p1 p2 | |
|
37 | 0 0 75 0 7 2565f3199a74 000000000000 000000000000 | |
|
38 | $ hg debugindex .hg/store/data/anotherfile.i | |
|
39 | rev offset length base linkrev nodeid p1 p2 | |
|
40 | 0 0 75 0 8 2565f3199a74 000000000000 000000000000 | |
|
41 | $ hg debugindex .hg/store/data/fred.i | |
|
42 | rev offset length base linkrev nodeid p1 p2 | |
|
43 | 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000 | |
|
44 | $ hg debugindex .hg/store/00manifest.i | |
|
45 | rev offset length base linkrev nodeid p1 p2 | |
|
46 | 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000 | |
|
47 | 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000 | |
|
48 | 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000 | |
|
49 | 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000 | |
|
50 | 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 | |
|
51 | 5 250 68 3 7 09bb521d218d de68e904d169 000000000000 | |
|
52 | 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000 | |
|
53 | $ hg verify | |
|
54 | checking changesets | |
|
55 | checking manifests | |
|
56 | crosschecking files in changesets and manifests | |
|
57 | checking files | |
|
58 | 4 files, 9 changesets, 7 total revisions | |
|
59 | 11 | $ cd .. |
|
12 | ||
|
60 | 13 | $ for i in 0 1 2 3 4 5 6 7 8; do |
|
61 | 14 | > mkdir test-"$i" |
|
62 | 15 | > hg --cwd test-"$i" init |
@@ -79,7 +32,7 b'' | |||
|
79 | 32 | crosschecking files in changesets and manifests |
|
80 | 33 | checking files |
|
81 | 34 | 1 files, 1 changesets, 1 total revisions |
|
82 | 0:f9ee2f85a263 | |
|
35 | 0:bfaf4b5cbf01 | |
|
83 | 36 | searching for changes |
|
84 | 37 | 2 changesets found |
|
85 | 38 | adding changesets |
@@ -92,7 +45,7 b'' | |||
|
92 | 45 | crosschecking files in changesets and manifests |
|
93 | 46 | checking files |
|
94 | 47 | 1 files, 2 changesets, 2 total revisions |
|
95 | 1:34c2bf6b0626 | |
|
48 | 1:21f32785131f | |
|
96 | 49 | searching for changes |
|
97 | 50 | 3 changesets found |
|
98 | 51 | adding changesets |
@@ -105,7 +58,7 b'' | |||
|
105 | 58 | crosschecking files in changesets and manifests |
|
106 | 59 | checking files |
|
107 | 60 | 1 files, 3 changesets, 3 total revisions |
|
108 | 2:e38ba6f5b7e0 | |
|
61 | 2:4ce51a113780 | |
|
109 | 62 | searching for changes |
|
110 | 63 | 4 changesets found |
|
111 | 64 | adding changesets |
@@ -118,7 +71,7 b'' | |||
|
118 | 71 | crosschecking files in changesets and manifests |
|
119 | 72 | checking files |
|
120 | 73 | 1 files, 4 changesets, 4 total revisions |
|
121 | 3:eebf5a27f8ca | |
|
74 | 3:93ee6ab32777 | |
|
122 | 75 | searching for changes |
|
123 | 76 | 2 changesets found |
|
124 | 77 | adding changesets |
@@ -131,7 +84,7 b'' | |||
|
131 | 84 | crosschecking files in changesets and manifests |
|
132 | 85 | checking files |
|
133 | 86 | 1 files, 2 changesets, 2 total revisions |
|
134 | 1:095197eb4973 | |
|
87 | 1:c70afb1ee985 | |
|
135 | 88 | searching for changes |
|
136 | 89 | 3 changesets found |
|
137 | 90 | adding changesets |
@@ -144,7 +97,7 b'' | |||
|
144 | 97 | crosschecking files in changesets and manifests |
|
145 | 98 | checking files |
|
146 | 99 | 1 files, 3 changesets, 3 total revisions |
|
147 | 2:1bb50a9436a7 | |
|
100 | 2:f03ae5a9b979 | |
|
148 | 101 | searching for changes |
|
149 | 102 | 4 changesets found |
|
150 | 103 | adding changesets |
@@ -157,7 +110,7 b'' | |||
|
157 | 110 | crosschecking files in changesets and manifests |
|
158 | 111 | checking files |
|
159 | 112 | 2 files, 4 changesets, 5 total revisions |
|
160 | 3:7373c1169842 | |
|
113 | 3:095cb14b1b4d | |
|
161 | 114 | searching for changes |
|
162 | 115 | 5 changesets found |
|
163 | 116 | adding changesets |
@@ -170,7 +123,7 b'' | |||
|
170 | 123 | crosschecking files in changesets and manifests |
|
171 | 124 | checking files |
|
172 | 125 | 3 files, 5 changesets, 6 total revisions |
|
173 | 4:a6a34bfa0076 | |
|
126 | 4:faa2e4234c7a | |
|
174 | 127 | searching for changes |
|
175 | 128 | 5 changesets found |
|
176 | 129 | adding changesets |
@@ -183,7 +136,7 b'' | |||
|
183 | 136 | crosschecking files in changesets and manifests |
|
184 | 137 | checking files |
|
185 | 138 | 2 files, 5 changesets, 5 total revisions |
|
186 | 4:aa35859c02ea | |
|
139 | 4:916f1afdef90 | |
|
187 | 140 | $ cd test-8 |
|
188 | 141 | $ hg pull ../test-7 |
|
189 | 142 | pulling from ../test-7 |
@@ -248,18 +201,18 b' result' | |||
|
248 | 201 | revision 2 |
|
249 | 202 | |
|
250 | 203 | $ hg tip -q |
|
251 | 2:e38ba6f5b7e0 | |
|
204 | 2:4ce51a113780 | |
|
252 | 205 | $ hg unbundle ../test-bundle-should-fail.hg |
|
253 | 206 | adding changesets |
|
254 | 207 | transaction abort! |
|
255 | 208 | rollback completed |
|
256 |
abort: 00changelog.i@ |
|
|
209 | abort: 00changelog.i@93ee6ab32777: unknown parent! | |
|
257 | 210 | [255] |
|
258 | 211 | |
|
259 | 212 | revision 2 |
|
260 | 213 | |
|
261 | 214 | $ hg tip -q |
|
262 | 2:e38ba6f5b7e0 | |
|
215 | 2:4ce51a113780 | |
|
263 | 216 | $ hg unbundle ../test-bundle-all.hg |
|
264 | 217 | adding changesets |
|
265 | 218 | adding manifests |
@@ -270,7 +223,7 b' revision 2' | |||
|
270 | 223 | revision 8 |
|
271 | 224 | |
|
272 | 225 | $ hg tip -q |
|
273 | 8:aa35859c02ea | |
|
226 | 8:916f1afdef90 | |
|
274 | 227 | $ hg verify |
|
275 | 228 | checking changesets |
|
276 | 229 | checking manifests |
@@ -284,7 +237,7 b' revision 8' | |||
|
284 | 237 | revision 2 |
|
285 | 238 | |
|
286 | 239 | $ hg tip -q |
|
287 | 2:e38ba6f5b7e0 | |
|
240 | 2:4ce51a113780 | |
|
288 | 241 | $ hg unbundle ../test-bundle-branch1.hg |
|
289 | 242 | adding changesets |
|
290 | 243 | adding manifests |
@@ -295,7 +248,7 b' revision 2' | |||
|
295 | 248 | revision 4 |
|
296 | 249 | |
|
297 | 250 | $ hg tip -q |
|
298 | 4:aa35859c02ea | |
|
251 | 4:916f1afdef90 | |
|
299 | 252 | $ hg verify |
|
300 | 253 | checking changesets |
|
301 | 254 | checking manifests |
@@ -315,7 +268,7 b' revision 4' | |||
|
315 | 268 | revision 6 |
|
316 | 269 | |
|
317 | 270 | $ hg tip -q |
|
318 | 6:a6a34bfa0076 | |
|
271 | 6:faa2e4234c7a | |
|
319 | 272 | $ hg verify |
|
320 | 273 | checking changesets |
|
321 | 274 | checking manifests |
@@ -335,7 +288,7 b' revision 6' | |||
|
335 | 288 | revision 4 |
|
336 | 289 | |
|
337 | 290 | $ hg tip -q |
|
338 | 4:aa35859c02ea | |
|
291 | 4:916f1afdef90 | |
|
339 | 292 | $ hg verify |
|
340 | 293 | checking changesets |
|
341 | 294 | checking manifests |
@@ -368,7 +321,7 b' revision 4' | |||
|
368 | 321 | revision 9 |
|
369 | 322 | |
|
370 | 323 | $ hg tip -q |
|
371 | 9:905597b0d5d4 | |
|
324 | 9:03fc0b0e347c | |
|
372 | 325 | $ hg verify |
|
373 | 326 | checking changesets |
|
374 | 327 | checking manifests |
@@ -16,7 +16,7 b" skip if we can't import elementtree" | |||
|
16 | 16 | |
|
17 | 17 | try converting darcs1 repository |
|
18 | 18 | |
|
19 | $ hg clone -q "$TESTDIR/darcs1.hg" darcs | |
|
19 | $ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs | |
|
20 | 20 | $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0 |
|
21 | 21 | darcs-1.0 repository format is unsupported, please upgrade |
|
22 | 22 |
@@ -6,6 +6,11 b' test command parsing and dispatch' | |||
|
6 | 6 | |
|
7 | 7 | $ hg init a |
|
8 | 8 | $ cd a |
|
9 | ||
|
10 | Redundant options used to crash (issue436): | |
|
11 | $ hg -v log -v | |
|
12 | $ hg -v log -v x | |
|
13 | ||
|
9 | 14 | $ echo a > a |
|
10 | 15 | $ hg ci -Ama |
|
11 | 16 | adding a |
@@ -5,7 +5,7 b' Test character encoding' | |||
|
5 | 5 | |
|
6 | 6 | we need a repo with some legacy latin-1 changesets |
|
7 | 7 | |
|
8 | $ hg unbundle $TESTDIR/legacy-encoding.hg | |
|
8 | $ hg unbundle $TESTDIR/bundles/legacy-encoding.hg | |
|
9 | 9 | adding changesets |
|
10 | 10 | adding manifests |
|
11 | 11 | adding file changes |
@@ -1,81 +1,15 b'' | |||
|
1 | creating 'remote | |
|
1 | 2 | |
|
2 | 3 | $ hg init remote |
|
3 | 4 | $ cd remote |
|
4 | ||
|
5 | creating 'remote | |
|
6 | ||
|
7 | $ cat >>afile <<EOF | |
|
8 | > 0 | |
|
9 | > EOF | |
|
10 |
$ hg |
|
|
11 | $ hg commit -m "0.0" | |
|
12 | $ cat >>afile <<EOF | |
|
13 | > 1 | |
|
14 | > EOF | |
|
15 | $ hg commit -m "0.1" | |
|
16 | $ cat >>afile <<EOF | |
|
17 | > 2 | |
|
18 | > EOF | |
|
19 | $ hg commit -m "0.2" | |
|
20 | $ cat >>afile <<EOF | |
|
21 | > 3 | |
|
22 | > EOF | |
|
23 | $ hg commit -m "0.3" | |
|
24 | $ hg update -C 0 | |
|
5 | $ hg unbundle $TESTDIR/bundles/remote.hg | |
|
6 | adding changesets | |
|
7 | adding manifests | |
|
8 | adding file changes | |
|
9 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
|
10 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
11 | $ hg up tip | |
|
25 | 12 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | $ cat >>afile <<EOF | |
|
27 | > 1 | |
|
28 | > EOF | |
|
29 | $ hg commit -m "1.1" | |
|
30 | created new head | |
|
31 | $ cat >>afile <<EOF | |
|
32 | > 2 | |
|
33 | > EOF | |
|
34 | $ hg commit -m "1.2" | |
|
35 | $ cat >fred <<EOF | |
|
36 | > a line | |
|
37 | > EOF | |
|
38 | $ cat >>afile <<EOF | |
|
39 | > 3 | |
|
40 | > EOF | |
|
41 | $ hg add fred | |
|
42 | $ hg commit -m "1.3" | |
|
43 | $ hg mv afile adifferentfile | |
|
44 | $ hg commit -m "1.3m" | |
|
45 | $ hg update -C 3 | |
|
46 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
|
47 | $ hg mv afile anotherfile | |
|
48 | $ hg commit -m "0.3m" | |
|
49 | $ hg debugindex .hg/store/data/afile.i | |
|
50 | rev offset length base linkrev nodeid p1 p2 | |
|
51 | 0 0 3 0 0 362fef284ce2 000000000000 000000000000 | |
|
52 | 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000 | |
|
53 | 2 8 7 2 2 4c982badb186 125144f7e028 000000000000 | |
|
54 | 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000 | |
|
55 | $ hg debugindex .hg/store/data/adifferentfile.i | |
|
56 | rev offset length base linkrev nodeid p1 p2 | |
|
57 | 0 0 75 0 7 2565f3199a74 000000000000 000000000000 | |
|
58 | $ hg debugindex .hg/store/data/anotherfile.i | |
|
59 | rev offset length base linkrev nodeid p1 p2 | |
|
60 | 0 0 75 0 8 2565f3199a74 000000000000 000000000000 | |
|
61 | $ hg debugindex .hg/store/data/fred.i | |
|
62 | rev offset length base linkrev nodeid p1 p2 | |
|
63 | 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000 | |
|
64 | $ hg debugindex .hg/store/00manifest.i | |
|
65 | rev offset length base linkrev nodeid p1 p2 | |
|
66 | 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000 | |
|
67 | 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000 | |
|
68 | 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000 | |
|
69 | 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000 | |
|
70 | 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 | |
|
71 | 5 250 68 3 7 09bb521d218d de68e904d169 000000000000 | |
|
72 | 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000 | |
|
73 | $ hg verify | |
|
74 | checking changesets | |
|
75 | checking manifests | |
|
76 | crosschecking files in changesets and manifests | |
|
77 | checking files | |
|
78 | 4 files, 9 changesets, 7 total revisions | |
|
79 | 13 | |
|
80 | 14 | Starting server |
|
81 | 15 |
@@ -11,6 +11,7 b'' | |||
|
11 | 11 | > sys.exit(0) |
|
12 | 12 | > sys.exit(1) |
|
13 | 13 | > EOF |
|
14 | ||
|
14 | 15 | $ hg init a |
|
15 | 16 | $ cd a |
|
16 | 17 | $ echo "Rev 1" >rev |
@@ -20,11 +21,17 b'' | |||
|
20 | 21 | marked working directory as branch abranch |
|
21 | 22 | $ echo "Rev 2" >rev |
|
22 | 23 | $ hg commit -m "With branch." |
|
23 | $ if hg export 0 | python ../findbranch.py; then | |
|
24 | ||
|
25 | $ hg export 0 > ../r0.patch | |
|
26 | $ hg export 1 > ../r1.patch | |
|
27 | $ cd .. | |
|
28 | ||
|
29 | $ if python findbranch.py < r0.patch; then | |
|
24 | 30 | > echo "Export of default branch revision has Branch header" 1>&2 |
|
25 | 31 | > exit 1 |
|
26 | 32 | > fi |
|
27 | $ if hg export 1 | python ../findbranch.py; then | |
|
33 | ||
|
34 | $ if python findbranch.py < r1.patch; then | |
|
28 | 35 | > : # Do nothing |
|
29 | 36 | > else |
|
30 | 37 | > echo "Export of branch revision is missing Branch header" 1>&2 |
@@ -33,18 +40,17 b'' | |||
|
33 | 40 | |
|
34 | 41 | Make sure import still works with branch information in patches. |
|
35 | 42 | |
|
36 | $ cd .. | |
|
37 | 43 | $ hg init b |
|
38 | 44 | $ cd b |
|
39 | $ hg -R ../a export 0 | hg import - | |
|
40 |
applying |
|
|
41 | $ hg -R ../a export 1 | hg import - | |
|
42 |
applying |
|
|
45 | $ hg import ../r0.patch | |
|
46 | applying ../r0.patch | |
|
47 | $ hg import ../r1.patch | |
|
48 | applying ../r1.patch | |
|
43 | 49 | $ cd .. |
|
44 | $ rm -rf b | |
|
45 |
$ hg init |
|
|
46 |
$ cd |
|
|
47 | $ hg -R ../a export 0 | hg import --exact - | |
|
48 |
applying |
|
|
49 | $ hg -R ../a export 1 | hg import --exact - | |
|
50 |
applying |
|
|
50 | ||
|
51 | $ hg init c | |
|
52 | $ cd c | |
|
53 | $ hg import --exact ../r0.patch | |
|
54 | applying ../r0.patch | |
|
55 | $ hg import --exact ../r1.patch | |
|
56 | applying ../r1.patch |
@@ -11,6 +11,12 b'' | |||
|
11 | 11 | $ hg --cwd a ci -u someone -d '1 0' -m'second change' |
|
12 | 12 | |
|
13 | 13 | |
|
14 | generate patches for the test | |
|
15 | ||
|
16 | $ hg --cwd a export tip > exported-tip.patch | |
|
17 | $ hg --cwd a diff -r0:1 > diffed-tip.patch | |
|
18 | ||
|
19 | ||
|
14 | 20 | import exported patch |
|
15 | 21 | |
|
16 | 22 | $ hg clone -r0 a b |
@@ -20,19 +26,18 b' import exported patch' | |||
|
20 | 26 | added 1 changesets with 2 changes to 2 files |
|
21 | 27 | updating to branch default |
|
22 | 28 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 |
$ hg --cwd |
|
|
24 | $ hg --cwd b import ../tip.patch | |
|
25 | applying ../tip.patch | |
|
29 | $ hg --cwd b import ../exported-tip.patch | |
|
30 | applying ../exported-tip.patch | |
|
26 | 31 | |
|
27 | message should be same | |
|
32 | message and committer should be same | |
|
28 | 33 | |
|
29 |
$ hg --cwd b tip |
|
|
34 | $ hg --cwd b tip | |
|
35 | changeset: 1:1d4bd90af0e4 | |
|
36 | tag: tip | |
|
37 | user: someone | |
|
38 | date: Thu Jan 01 00:00:01 1970 +0000 | |
|
30 | 39 | summary: second change |
|
31 | ||
|
32 | committer should be same | |
|
33 | ||
|
34 | $ hg --cwd b tip | grep someone | |
|
35 | user: someone | |
|
40 | ||
|
36 | 41 | $ rm -r b |
|
37 | 42 | |
|
38 | 43 | |
@@ -50,9 +55,8 b' import exported patch with external patc' | |||
|
50 | 55 | added 1 changesets with 2 changes to 2 files |
|
51 | 56 | updating to branch default |
|
52 | 57 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | $ hg --cwd a export tip > tip.patch | |
|
54 | $ hg --config ui.patch='python ../dummypatch.py' --cwd b import ../tip.patch | |
|
55 | applying ../tip.patch | |
|
58 | $ hg --config ui.patch='python ../dummypatch.py' --cwd b import ../exported-tip.patch | |
|
59 | applying ../exported-tip.patch | |
|
56 | 60 | $ cat b/a |
|
57 | 61 | line2 |
|
58 | 62 | $ rm -r b |
@@ -67,9 +71,8 b' import of plain diff should fail without' | |||
|
67 | 71 | added 1 changesets with 2 changes to 2 files |
|
68 | 72 | updating to branch default |
|
69 | 73 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
70 |
$ hg --cwd |
|
|
71 | $ hg --cwd b import ../tip.patch | |
|
72 | applying ../tip.patch | |
|
74 | $ hg --cwd b import ../diffed-tip.patch | |
|
75 | applying ../diffed-tip.patch | |
|
73 | 76 | abort: empty commit message |
|
74 | 77 | [255] |
|
75 | 78 | $ rm -r b |
@@ -84,9 +87,8 b' import of plain diff should be ok with m' | |||
|
84 | 87 | added 1 changesets with 2 changes to 2 files |
|
85 | 88 | updating to branch default |
|
86 | 89 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
87 |
$ hg --cwd |
|
|
88 | $ hg --cwd b import -mpatch ../tip.patch | |
|
89 | applying ../tip.patch | |
|
90 | $ hg --cwd b import -mpatch ../diffed-tip.patch | |
|
91 | applying ../diffed-tip.patch | |
|
90 | 92 | $ rm -r b |
|
91 | 93 | |
|
92 | 94 | |
@@ -99,9 +101,8 b' import of plain diff with specific date ' | |||
|
99 | 101 | added 1 changesets with 2 changes to 2 files |
|
100 | 102 | updating to branch default |
|
101 | 103 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
102 | $ hg --cwd a diff -r0:1 > tip.patch | |
|
103 | $ hg --cwd b import -mpatch -d '1 0' -u 'user@nowhere.net' ../tip.patch | |
|
104 | applying ../tip.patch | |
|
104 | $ hg --cwd b import -mpatch -d '1 0' -u 'user@nowhere.net' ../diffed-tip.patch | |
|
105 | applying ../diffed-tip.patch | |
|
105 | 106 | $ hg -R b tip -pv |
|
106 | 107 | changeset: 1:ca68f19f3a40 |
|
107 | 108 | tag: tip |
@@ -131,9 +132,8 b' import of plain diff should be ok with -' | |||
|
131 | 132 | added 1 changesets with 2 changes to 2 files |
|
132 | 133 | updating to branch default |
|
133 | 134 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
134 |
$ hg --cwd |
|
|
135 | $ hg --cwd b import --no-commit ../tip.patch | |
|
136 | applying ../tip.patch | |
|
135 | $ hg --cwd b import --no-commit ../diffed-tip.patch | |
|
136 | applying ../diffed-tip.patch | |
|
137 | 137 | $ hg --cwd b diff --nodates |
|
138 | 138 | diff -r 80971e65b431 a |
|
139 | 139 | --- a/a |
@@ -153,8 +153,7 b' import of malformed plain diff should fa' | |||
|
153 | 153 | added 1 changesets with 2 changes to 2 files |
|
154 | 154 | updating to branch default |
|
155 | 155 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
156 | $ hg --cwd a diff -r0:1 > tip.patch | |
|
157 | $ sed 's/1,1/foo/' < tip.patch > broken.patch | |
|
156 | $ sed 's/1,1/foo/' < diffed-tip.patch > broken.patch | |
|
158 | 157 |
$ |
|
159 | 158 | applying ../broken.patch |
|
160 | 159 | abort: bad hunk #1 |
@@ -174,10 +173,9 b' used to hide a bug.' | |||
|
174 | 173 | added 1 changesets with 2 changes to 2 files |
|
175 | 174 | updating to branch default |
|
176 | 175 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
177 | $ hg --cwd a export tip > dir/tip.patch | |
|
178 | 176 | $ cd dir |
|
179 | $ hg -R b import tip.patch | |
|
180 | applying tip.patch | |
|
177 | $ hg -R b import ../exported-tip.patch | |
|
178 | applying ../exported-tip.patch | |
|
181 | 179 | $ cd .. |
|
182 | 180 | $ rm -r dir |
|
183 | 181 | |
@@ -191,7 +189,7 b' import from stdin' | |||
|
191 | 189 | added 1 changesets with 2 changes to 2 files |
|
192 | 190 | updating to branch default |
|
193 | 191 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
194 | $ hg --cwd a export tip | hg --cwd b import - | |
|
192 | $ hg --cwd b import - < exported-tip.patch | |
|
195 | 193 | applying patch from stdin |
|
196 | 194 | $ rm -r b |
|
197 | 195 | |
@@ -218,7 +216,7 b' override commit message' | |||
|
218 | 216 | added 1 changesets with 2 changes to 2 files |
|
219 | 217 | updating to branch default |
|
220 | 218 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
221 |
$ |
|
|
219 | $ hg --cwd b import -m 'override' - < exported-tip.patch | |
|
222 | 220 | applying patch from stdin |
|
223 | 221 | $ hg --cwd b tip | grep override |
|
224 | 222 | summary: override |
@@ -227,7 +225,8 b' override commit message' | |||
|
227 | 225 | $ cat > mkmsg.py <<EOF |
|
228 | 226 | > import email.Message, sys |
|
229 | 227 | > msg = email.Message.Message() |
|
230 | > msg.set_payload('email commit message\n' + open('tip.patch', 'rb').read()) | |
|
228 | > patch = open(sys.argv[1], 'rb').read() | |
|
229 | > msg.set_payload('email commit message\n' + patch) | |
|
231 | 230 | > msg['Subject'] = 'email patch' |
|
232 | 231 | > msg['From'] = 'email patcher' |
|
233 | 232 | > sys.stdout.write(msg.as_string()) |
@@ -243,8 +242,7 b' plain diff in email, subject, message bo' | |||
|
243 | 242 | added 1 changesets with 2 changes to 2 files |
|
244 | 243 | updating to branch default |
|
245 | 244 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
246 | $ hg --cwd a diff -r0:1 > tip.patch | |
|
247 | $ python mkmsg.py > msg.patch | |
|
245 | $ python mkmsg.py diffed-tip.patch > msg.patch | |
|
248 | 246 | $ hg --cwd b import ../msg.patch |
|
249 | 247 | applying ../msg.patch |
|
250 | 248 | $ hg --cwd b tip | grep email |
@@ -306,8 +304,7 b' hg export in email, should use patch hea' | |||
|
306 | 304 | added 1 changesets with 2 changes to 2 files |
|
307 | 305 | updating to branch default |
|
308 | 306 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
309 | $ hg --cwd a export tip > tip.patch | |
|
310 | $ python mkmsg.py | hg --cwd b import - | |
|
307 | $ python mkmsg.py exported-tip.patch | hg --cwd b import - | |
|
311 | 308 | applying patch from stdin |
|
312 | 309 | $ hg --cwd b tip | grep second |
|
313 | 310 | summary: second change |
@@ -320,7 +317,8 b" The '---' tests the gitsendmail handling" | |||
|
320 | 317 | $ cat > mkmsg2.py <<EOF |
|
321 | 318 | > import email.Message, sys |
|
322 | 319 | > msg = email.Message.Message() |
|
323 | > msg.set_payload('email patch\n\nnext line\n---\n' + open('tip.patch').read()) | |
|
320 | > patch = open(sys.argv[1], 'rb').read() | |
|
321 | > msg.set_payload('email patch\n\nnext line\n---\n' + patch) | |
|
324 | 322 | > msg['Subject'] = '[PATCH] email patch' |
|
325 | 323 | > msg['From'] = 'email patcher' |
|
326 | 324 | > sys.stdout.write(msg.as_string()) |
@@ -336,8 +334,7 b' plain diff in email, [PATCH] subject, me' | |||
|
336 | 334 | added 1 changesets with 2 changes to 2 files |
|
337 | 335 | updating to branch default |
|
338 | 336 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
339 | $ hg --cwd a diff -r0:1 > tip.patch | |
|
340 | $ python mkmsg2.py | hg --cwd b import - | |
|
337 | $ python mkmsg2.py diffed-tip.patch | hg --cwd b import - | |
|
341 | 338 | applying patch from stdin |
|
342 | 339 | $ hg --cwd b tip --template '{desc}\n' |
|
343 | 340 | email patch |
@@ -386,22 +383,23 b' hg import in a subdirectory' | |||
|
386 | 383 | updating to branch default |
|
387 | 384 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
388 | 385 | $ hg --cwd a export tip > tmp |
|
389 | $ sed -e 's/d1\/d2\///' < tmp > tip.patch | |
|
386 | $ sed -e 's/d1\/d2\///' < tmp > subdir-tip.patch | |
|
390 | 387 | $ dir=`pwd` |
|
391 | 388 | $ cd b/d1/d2 2>&1 > /dev/null |
|
392 | $ hg import ../../../tip.patch | |
|
393 | applying ../../../tip.patch | |
|
389 | $ hg import ../../../subdir-tip.patch | |
|
390 | applying ../../../subdir-tip.patch | |
|
394 | 391 | $ cd "$dir" |
|
395 | 392 | |
|
396 | 393 | message should be 'subdir change' |
|
397 | ||
|
398 | $ hg --cwd b tip | grep 'subdir change' | |
|
399 | summary: subdir change | |
|
400 | ||
|
401 | 394 | committer should be 'someoneelse' |
|
402 | 395 | |
|
403 |
$ hg --cwd b tip |
|
|
396 | $ hg --cwd b tip | |
|
397 | changeset: 1:3577f5aea227 | |
|
398 | tag: tip | |
|
404 | 399 | user: someoneelse |
|
400 | date: Thu Jan 01 00:00:01 1970 +0000 | |
|
401 | summary: subdir change | |
|
402 | ||
|
405 | 403 | |
|
406 | 404 | should be empty |
|
407 | 405 | |
@@ -422,7 +420,7 b' Test fuzziness (ambiguous patch location' | |||
|
422 | 420 | $ echo line0 >> a |
|
423 | 421 | $ echo line3 >> a |
|
424 | 422 | $ hg ci -m change a |
|
425 | $ hg export tip > tip.patch | |
|
423 | $ hg export tip > fuzzy-tip.patch | |
|
426 | 424 | $ hg up -C 0 |
|
427 | 425 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
428 | 426 | $ echo line1 > a |
@@ -431,8 +429,8 b' Test fuzziness (ambiguous patch location' | |||
|
431 | 429 | $ echo line0 >> a |
|
432 | 430 | $ hg ci -m brancha |
|
433 | 431 | created new head |
|
434 | $ hg import --no-commit -v tip.patch | |
|
435 | applying tip.patch | |
|
432 | $ hg import --no-commit -v fuzzy-tip.patch | |
|
433 | applying fuzzy-tip.patch | |
|
436 | 434 | patching file a |
|
437 | 435 | Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines). |
|
438 | 436 | $ hg revert -a |
@@ -447,8 +445,8 b' import with --no-commit should have writ' | |||
|
447 | 445 | |
|
448 | 446 | test fuzziness with eol=auto |
|
449 | 447 | |
|
450 | $ hg --config patch.eol=auto import --no-commit -v tip.patch | |
|
451 | applying tip.patch | |
|
448 | $ hg --config patch.eol=auto import --no-commit -v fuzzy-tip.patch | |
|
449 | applying fuzzy-tip.patch | |
|
452 | 450 | patching file a |
|
453 | 451 | Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines). |
|
454 | 452 | $ cd .. |
|
1 | NO CONTENT: modified file chmod 100755 => 100644 |
@@ -1,4 +1,5 b'' | |||
|
1 | http://mercurial.selenic.com/bts/issue660 | |
|
1 | http://mercurial.selenic.com/bts/issue660 and: | |
|
2 | http://mercurial.selenic.com/bts/issue322 | |
|
2 | 3 | |
|
3 | 4 | $ hg init |
|
4 | 5 | $ echo a > a |
@@ -78,7 +78,7 b' A bundle to test this was made with:' | |||
|
78 | 78 | hg ci -m addsym -u mercurial |
|
79 | 79 | hg bundle --base null ../test-keyword.hg |
|
80 | 80 | |
|
81 | $ hg pull -u "$TESTDIR"/test-keyword.hg | |
|
81 | $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg | |
|
82 | 82 | pulling from *test-keyword.hg (glob) |
|
83 | 83 | requesting all changes |
|
84 | 84 | adding changesets |
@@ -10,7 +10,7 b' Source bundle was generated with the fol' | |||
|
10 | 10 | # hg ci -Amb -d'1 0' |
|
11 | 11 | |
|
12 | 12 | $ hg init |
|
13 | $ hg -q pull "$TESTDIR/test-manifest.hg" | |
|
13 | $ hg -q pull "$TESTDIR/bundles/test-manifest.hg" | |
|
14 | 14 | |
|
15 | 15 | The next call is expected to return nothing: |
|
16 | 16 |
@@ -30,7 +30,7 b' a file, once as a link. Bundle was gener' | |||
|
30 | 30 | |
|
31 | 31 | $ hg init t |
|
32 | 32 | $ cd t |
|
33 | $ hg -q pull "$TESTDIR/test-merge-symlinks.hg" | |
|
33 | $ hg -q pull "$TESTDIR/bundles/test-merge-symlinks.hg" | |
|
34 | 34 | $ hg up -C 3 |
|
35 | 35 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
36 | 36 |
@@ -16,7 +16,7 b' Extract a symlink on a platform not supp' | |||
|
16 | 16 | |
|
17 | 17 | $ hg init t |
|
18 | 18 | $ cd t |
|
19 | $ hg pull -q "$TESTDIR/test-no-symlinks.hg" | |
|
19 | $ hg pull -q "$TESTDIR/bundles/test-no-symlinks.hg" | |
|
20 | 20 | $ hg update |
|
21 | 21 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
22 | 22 | $ cat a.lnk && echo |
|
1 | NO CONTENT: modified file chmod 100755 => 100644 |
@@ -1,95 +1,13 b'' | |||
|
1 | 1 | $ hg init test |
|
2 | 2 | $ cd test |
|
3 | ||
|
4 | $ cat >>afile <<EOF | |
|
5 | > 0 | |
|
6 | > EOF | |
|
7 | $ hg add afile | |
|
8 | $ hg commit -m "0.0" | |
|
9 | ||
|
10 | $ cat >>afile <<EOF | |
|
11 | > 1 | |
|
12 | > EOF | |
|
13 | $ hg commit -m "0.1" | |
|
14 | ||
|
15 | $ cat >>afile <<EOF | |
|
16 | > 2 | |
|
17 | > EOF | |
|
18 | $ hg commit -m "0.2" | |
|
19 | ||
|
20 | $ cat >>afile <<EOF | |
|
21 | > 3 | |
|
22 | > EOF | |
|
23 | $ hg commit -m "0.3" | |
|
24 | ||
|
25 | $ hg update -C 0 | |
|
3 | $ hg unbundle $TESTDIR/bundles/remote.hg | |
|
4 | adding changesets | |
|
5 | adding manifests | |
|
6 | adding file changes | |
|
7 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
|
8 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
9 | $ hg up tip | |
|
26 | 10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | ||
|
28 | $ cat >>afile <<EOF | |
|
29 | > 1 | |
|
30 | > EOF | |
|
31 | $ hg commit -m "1.1" | |
|
32 | created new head | |
|
33 | ||
|
34 | $ cat >>afile <<EOF | |
|
35 | > 2 | |
|
36 | > EOF | |
|
37 | $ hg commit -m "1.2" | |
|
38 | ||
|
39 | $ cat >fred <<EOF | |
|
40 | > a line | |
|
41 | > EOF | |
|
42 | $ cat >>afile <<EOF | |
|
43 | > 3 | |
|
44 | > EOF | |
|
45 | $ hg add fred | |
|
46 | $ hg commit -m "1.3" | |
|
47 | ||
|
48 | $ hg mv afile adifferentfile | |
|
49 | $ hg commit -m "1.3m" | |
|
50 | ||
|
51 | $ hg update -C 3 | |
|
52 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
|
53 | ||
|
54 | $ hg mv afile anotherfile | |
|
55 | $ hg commit -m "0.3m" | |
|
56 | ||
|
57 | $ hg debugindex .hg/store/data/afile.i | |
|
58 | rev offset length base linkrev nodeid p1 p2 | |
|
59 | 0 0 3 0 0 362fef284ce2 000000000000 000000000000 | |
|
60 | 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000 | |
|
61 | 2 8 7 2 2 4c982badb186 125144f7e028 000000000000 | |
|
62 | 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000 | |
|
63 | ||
|
64 | $ hg debugindex .hg/store/data/adifferentfile.i | |
|
65 | rev offset length base linkrev nodeid p1 p2 | |
|
66 | 0 0 75 0 7 2565f3199a74 000000000000 000000000000 | |
|
67 | ||
|
68 | $ hg debugindex .hg/store/data/anotherfile.i | |
|
69 | rev offset length base linkrev nodeid p1 p2 | |
|
70 | 0 0 75 0 8 2565f3199a74 000000000000 000000000000 | |
|
71 | ||
|
72 | $ hg debugindex .hg/store/data/fred.i | |
|
73 | rev offset length base linkrev nodeid p1 p2 | |
|
74 | 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000 | |
|
75 | ||
|
76 | $ hg debugindex .hg/store/00manifest.i | |
|
77 | rev offset length base linkrev nodeid p1 p2 | |
|
78 | 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000 | |
|
79 | 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000 | |
|
80 | 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000 | |
|
81 | 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000 | |
|
82 | 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 | |
|
83 | 5 250 68 3 7 09bb521d218d de68e904d169 000000000000 | |
|
84 | 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000 | |
|
85 | ||
|
86 | $ hg verify | |
|
87 | checking changesets | |
|
88 | checking manifests | |
|
89 | crosschecking files in changesets and manifests | |
|
90 | checking files | |
|
91 | 4 files, 9 changesets, 7 total revisions | |
|
92 | ||
|
93 | 11 | $ cd .. |
|
94 | 12 | |
|
95 | 13 | $ for i in 0 1 2 3 4 5 6 7 8; do |
@@ -11,45 +11,14 b' Create repo a:' | |||
|
11 | 11 | |
|
12 | 12 | $ hg init a |
|
13 | 13 | $ cd a |
|
14 | ||
|
15 | $ echo A > A | |
|
16 | $ hg ci -Am A | |
|
17 | adding A | |
|
18 | $ echo B > B | |
|
19 | $ hg ci -Am B | |
|
20 | adding B | |
|
21 | $ echo C > C | |
|
22 | $ hg ci -Am C | |
|
23 | adding C | |
|
24 | $ echo D > D | |
|
25 | $ hg ci -Am D | |
|
26 | adding D | |
|
27 | ||
|
28 | $ hg up -q -C 0 | |
|
29 | ||
|
30 | $ echo E > E | |
|
31 | $ hg ci -Am E | |
|
32 | adding E | |
|
33 | created new head | |
|
34 | ||
|
35 | $ hg up -q -C 0 | |
|
36 | ||
|
37 | $ echo F > F | |
|
38 | $ hg ci -Am F | |
|
39 | adding F | |
|
40 | created new head | |
|
41 | ||
|
42 | $ hg merge -r 4 | |
|
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
44 | (branch merge, don't forget to commit) | |
|
45 | $ hg ci -m G | |
|
46 | ||
|
47 | $ hg up -q -C 5 | |
|
48 | ||
|
49 | $ echo H > H | |
|
50 | $ hg ci -Am H | |
|
51 | adding H | |
|
52 | created new head | |
|
14 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
|
15 | adding changesets | |
|
16 | adding manifests | |
|
17 | adding file changes | |
|
18 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
|
19 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
20 | $ hg up tip | |
|
21 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
53 | 22 | |
|
54 | 23 | $ hg tglog |
|
55 | 24 | @ 7: 'H' |
@@ -10,41 +10,32 b'' | |||
|
10 | 10 | |
|
11 | 11 | $ hg init a |
|
12 | 12 | $ cd a |
|
13 | ||
|
14 | $ echo A > A | |
|
15 | $ hg ci -Am A | |
|
16 | adding A | |
|
17 | ||
|
18 | $ echo B > B | |
|
19 | $ hg ci -Am B | |
|
20 | adding B | |
|
21 | ||
|
22 | $ echo C > C | |
|
23 | $ hg ci -Am C | |
|
24 | adding C | |
|
25 | ||
|
26 | $ echo D > D | |
|
27 | $ hg ci -Am D | |
|
28 | adding D | |
|
29 | ||
|
30 | $ hg up -q -C 0 | |
|
31 | ||
|
32 | $ echo E > E | |
|
33 | $ hg ci -Am E | |
|
34 | adding E | |
|
35 | created new head | |
|
13 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
|
14 | adding changesets | |
|
15 | adding manifests | |
|
16 | adding file changes | |
|
17 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
|
18 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
19 | $ hg up tip | |
|
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
36 | 21 | |
|
37 | 22 | $ cd .. |
|
38 | 23 | |
|
39 | 24 | |
|
40 |
Rebasing D onto |
|
|
25 | Rebasing D onto H detaching from C: | |
|
41 | 26 | |
|
42 | 27 | $ hg clone -q -u . a a1 |
|
43 | 28 | $ cd a1 |
|
44 | 29 | |
|
45 | 30 | $ hg tglog |
|
46 |
@ |
|
|
31 | @ 7: 'H' | |
|
47 | 32 | | |
|
33 | | o 6: 'G' | |
|
34 | |/| | |
|
35 | o | 5: 'F' | |
|
36 | | | | |
|
37 | | o 4: 'E' | |
|
38 | |/ | |
|
48 | 39 | | o 3: 'D' |
|
49 | 40 | | | |
|
50 | 41 | | o 2: 'C' |
@@ -53,14 +44,20 b' Rebasing D onto E detaching from C:' | |||
|
53 | 44 | |/ |
|
54 | 45 | o 0: 'A' |
|
55 | 46 | |
|
56 |
$ hg rebase --detach -s 3 -d |
|
|
47 | $ hg rebase --detach -s 3 -d 7 | |
|
57 | 48 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) |
|
58 | 49 | |
|
59 | 50 | $ hg tglog |
|
60 |
@ |
|
|
51 | @ 7: 'D' | |
|
52 | | | |
|
53 | o 6: 'H' | |
|
61 | 54 | | |
|
62 |
o |
|
|
63 | | | |
|
55 | | o 5: 'G' | |
|
56 | |/| | |
|
57 | o | 4: 'F' | |
|
58 | | | | |
|
59 | | o 3: 'E' | |
|
60 | |/ | |
|
64 | 61 | | o 2: 'C' |
|
65 | 62 | | | |
|
66 | 63 | | o 1: 'B' |
@@ -70,19 +67,26 b' Rebasing D onto E detaching from C:' | |||
|
70 | 67 | $ hg manifest |
|
71 | 68 | A |
|
72 | 69 | D |
|
73 |
|
|
|
70 | F | |
|
71 | H | |
|
74 | 72 | |
|
75 | 73 | $ cd .. |
|
76 | 74 | |
|
77 | 75 | |
|
78 |
Rebasing C onto |
|
|
76 | Rebasing C onto H detaching from B: | |
|
79 | 77 | |
|
80 | 78 | $ hg clone -q -u . a a2 |
|
81 | 79 | $ cd a2 |
|
82 | 80 | |
|
83 | 81 | $ hg tglog |
|
84 |
@ |
|
|
82 | @ 7: 'H' | |
|
85 | 83 | | |
|
84 | | o 6: 'G' | |
|
85 | |/| | |
|
86 | o | 5: 'F' | |
|
87 | | | | |
|
88 | | o 4: 'E' | |
|
89 | |/ | |
|
86 | 90 | | o 3: 'D' |
|
87 | 91 | | | |
|
88 | 92 | | o 2: 'C' |
@@ -91,16 +95,22 b' Rebasing C onto E detaching from B:' | |||
|
91 | 95 | |/ |
|
92 | 96 | o 0: 'A' |
|
93 | 97 | |
|
94 |
$ hg rebase --detach -s 2 -d |
|
|
98 | $ hg rebase --detach -s 2 -d 7 | |
|
95 | 99 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) |
|
96 | 100 | |
|
97 | 101 | $ hg tglog |
|
98 |
@ |
|
|
102 | @ 7: 'D' | |
|
103 | | | |
|
104 | o 6: 'C' | |
|
105 | | | |
|
106 | o 5: 'H' | |
|
99 | 107 | | |
|
100 |
o |
|
|
101 | | | |
|
102 |
o |
|
|
103 | | | |
|
108 | | o 4: 'G' | |
|
109 | |/| | |
|
110 | o | 3: 'F' | |
|
111 | | | | |
|
112 | | o 2: 'E' | |
|
113 | |/ | |
|
104 | 114 | | o 1: 'B' |
|
105 | 115 | |/ |
|
106 | 116 | o 0: 'A' |
@@ -109,19 +119,26 b' Rebasing C onto E detaching from B:' | |||
|
109 | 119 | A |
|
110 | 120 | C |
|
111 | 121 | D |
|
112 |
|
|
|
122 | F | |
|
123 | H | |
|
113 | 124 | |
|
114 | 125 | $ cd .. |
|
115 | 126 | |
|
116 | 127 | |
|
117 |
Rebasing B onto |
|
|
128 | Rebasing B onto H using detach (same as not using it): | |
|
118 | 129 | |
|
119 | 130 | $ hg clone -q -u . a a3 |
|
120 | 131 | $ cd a3 |
|
121 | 132 | |
|
122 | 133 | $ hg tglog |
|
123 |
@ |
|
|
134 | @ 7: 'H' | |
|
124 | 135 | | |
|
136 | | o 6: 'G' | |
|
137 | |/| | |
|
138 | o | 5: 'F' | |
|
139 | | | | |
|
140 | | o 4: 'E' | |
|
141 | |/ | |
|
125 | 142 | | o 3: 'D' |
|
126 | 143 | | | |
|
127 | 144 | | o 2: 'C' |
@@ -130,18 +147,24 b' Rebasing B onto E using detach (same as ' | |||
|
130 | 147 | |/ |
|
131 | 148 | o 0: 'A' |
|
132 | 149 | |
|
133 |
$ hg rebase --detach -s 1 -d |
|
|
150 | $ hg rebase --detach -s 1 -d 7 | |
|
134 | 151 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) |
|
135 | 152 | |
|
136 | 153 | $ hg tglog |
|
137 |
@ |
|
|
154 | @ 7: 'D' | |
|
138 | 155 | | |
|
139 |
o |
|
|
156 | o 6: 'C' | |
|
157 | | | |
|
158 | o 5: 'B' | |
|
140 | 159 | | |
|
141 |
o |
|
|
160 | o 4: 'H' | |
|
142 | 161 | | |
|
143 |
o |
|
|
144 | | | |
|
162 | | o 3: 'G' | |
|
163 | |/| | |
|
164 | o | 2: 'F' | |
|
165 | | | | |
|
166 | | o 1: 'E' | |
|
167 | |/ | |
|
145 | 168 | o 0: 'A' |
|
146 | 169 | |
|
147 | 170 | $ hg manifest |
@@ -149,19 +172,26 b' Rebasing B onto E using detach (same as ' | |||
|
149 | 172 | B |
|
150 | 173 | C |
|
151 | 174 | D |
|
152 |
|
|
|
175 | F | |
|
176 | H | |
|
153 | 177 | |
|
154 | 178 | $ cd .. |
|
155 | 179 | |
|
156 | 180 | |
|
157 |
Rebasing C onto |
|
|
181 | Rebasing C onto H detaching from B and collapsing: | |
|
158 | 182 | |
|
159 | 183 | $ hg clone -q -u . a a4 |
|
160 | 184 | $ cd a4 |
|
161 | 185 | |
|
162 | 186 | $ hg tglog |
|
163 |
@ |
|
|
187 | @ 7: 'H' | |
|
164 | 188 | | |
|
189 | | o 6: 'G' | |
|
190 | |/| | |
|
191 | o | 5: 'F' | |
|
192 | | | | |
|
193 | | o 4: 'E' | |
|
194 | |/ | |
|
165 | 195 | | o 3: 'D' |
|
166 | 196 | | | |
|
167 | 197 | | o 2: 'C' |
@@ -170,15 +200,21 b' Rebasing C onto E detaching from B and c' | |||
|
170 | 200 | |/ |
|
171 | 201 | o 0: 'A' |
|
172 | 202 | |
|
173 |
$ hg rebase --detach --collapse -s 2 -d |
|
|
203 | $ hg rebase --detach --collapse -s 2 -d 7 | |
|
174 | 204 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob) |
|
175 | 205 | |
|
176 | 206 | $ hg tglog |
|
177 |
@ |
|
|
207 | @ 6: 'Collapsed revision | |
|
178 | 208 | | * C |
|
179 | 209 | | * D' |
|
180 |
o |
|
|
210 | o 5: 'H' | |
|
181 | 211 | | |
|
212 | | o 4: 'G' | |
|
213 | |/| | |
|
214 | o | 3: 'F' | |
|
215 | | | | |
|
216 | | o 2: 'E' | |
|
217 | |/ | |
|
182 | 218 | | o 1: 'B' |
|
183 | 219 | |/ |
|
184 | 220 | o 0: 'A' |
@@ -187,7 +223,8 b' Rebasing C onto E detaching from B and c' | |||
|
187 | 223 | A |
|
188 | 224 | C |
|
189 | 225 | D |
|
190 |
|
|
|
226 | F | |
|
227 | H | |
|
191 | 228 | |
|
192 | 229 | $ cd .. |
|
193 | 230 | |
@@ -204,10 +241,16 b' Rebasing across null as ancestor' | |||
|
204 | 241 | created new head |
|
205 | 242 | |
|
206 | 243 | $ hg tglog |
|
207 |
@ |
|
|
244 | @ 8: 'extra branch' | |
|
208 | 245 | |
|
209 |
o |
|
|
246 | o 7: 'H' | |
|
210 | 247 | | |
|
248 | | o 6: 'G' | |
|
249 | |/| | |
|
250 | o | 5: 'F' | |
|
251 | | | | |
|
252 | | o 4: 'E' | |
|
253 | |/ | |
|
211 | 254 | | o 3: 'D' |
|
212 | 255 | | | |
|
213 | 256 | | o 2: 'C' |
@@ -220,15 +263,21 b' Rebasing across null as ancestor' | |||
|
220 | 263 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob) |
|
221 | 264 | |
|
222 | 265 | $ hg tglog |
|
223 |
@ |
|
|
266 | @ 8: 'D' | |
|
224 | 267 | | |
|
225 |
o |
|
|
268 | o 7: 'C' | |
|
269 | | | |
|
270 | o 6: 'B' | |
|
226 | 271 | | |
|
227 | o 3: 'B' | |
|
272 | o 5: 'extra branch' | |
|
273 | ||
|
274 | o 4: 'H' | |
|
228 | 275 | | |
|
229 | o 2: 'extra branch' | |
|
230 | ||
|
231 |
o |
|
|
232 | | | |
|
276 | | o 3: 'G' | |
|
277 | |/| | |
|
278 | o | 2: 'F' | |
|
279 | | | | |
|
280 | | o 1: 'E' | |
|
281 | |/ | |
|
233 | 282 | o 0: 'A' |
|
234 | 283 |
@@ -7,45 +7,16 b'' | |||
|
7 | 7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
8 | 8 | > EOF |
|
9 | 9 | |
|
10 | ||
|
11 | 10 | $ hg init a |
|
12 | 11 | $ cd a |
|
13 | ||
|
14 | $ echo A > A | |
|
15 | $ hg ci -Am A | |
|
16 | adding A | |
|
17 | ||
|
18 | $ echo B > B | |
|
19 | $ hg ci -Am B | |
|
20 | adding B | |
|
21 | ||
|
22 | $ hg up -q -C 0 | |
|
23 | ||
|
24 | $ echo C > C | |
|
25 | $ hg ci -Am C | |
|
26 | adding C | |
|
27 | created new head | |
|
28 | ||
|
29 | $ hg up -q -C 0 | |
|
30 | ||
|
31 | $ echo D > D | |
|
32 | $ hg ci -Am D | |
|
33 | adding D | |
|
34 | created new head | |
|
35 | ||
|
36 | $ hg merge -r 2 | |
|
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
38 | (branch merge, don't forget to commit) | |
|
39 | ||
|
40 | $ hg ci -m E | |
|
41 | ||
|
42 | $ hg up -q -C 3 | |
|
43 | ||
|
44 | $ echo F > F | |
|
45 | $ hg ci -Am F | |
|
46 | adding F | |
|
47 | created new head | |
|
48 | ||
|
12 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
|
13 | adding changesets | |
|
14 | adding manifests | |
|
15 | adding file changes | |
|
16 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
|
17 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
18 | $ hg up tip | |
|
19 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
49 | 20 | $ cd .. |
|
50 | 21 | |
|
51 | 22 | |
@@ -65,107 +36,72 b' Rebasing descendant onto ancestor across' | |||
|
65 | 36 | $ hg ci -m 'extra named branch' |
|
66 | 37 | |
|
67 | 38 | $ hg tglog |
|
68 |
@ |
|
|
39 | @ 8: 'extra named branch' dev | |
|
69 | 40 | | |
|
70 |
o |
|
|
41 | o 7: 'H' | |
|
71 | 42 | | |
|
72 |
| o |
|
|
43 | | o 6: 'G' | |
|
73 | 44 | |/| |
|
74 |
o | |
|
|
45 | o | 5: 'F' | |
|
46 | | | | |
|
47 | | o 4: 'E' | |
|
48 | |/ | |
|
49 | | o 3: 'D' | |
|
75 | 50 | | | |
|
76 | 51 | | o 2: 'C' |
|
77 |
| |
|
|
52 | | | | |
|
78 | 53 | | o 1: 'B' |
|
79 | 54 | |/ |
|
80 | 55 | o 0: 'A' |
|
81 | 56 | |
|
82 | $ hg rebase -s 6 -d 5 | |
|
57 | ||
|
58 | ||
|
59 | $ hg rebase -s 1 -d 8 --keepbranches | |
|
83 | 60 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) |
|
84 | 61 | |
|
85 | 62 | $ hg tglog |
|
86 | @ 6: 'extra named branch' | |
|
63 | @ 8: 'D' | |
|
64 | | | |
|
65 | o 7: 'C' | |
|
66 | | | |
|
67 | o 6: 'B' | |
|
87 | 68 | | |
|
88 | o 5: 'F' | |
|
69 | o 5: 'extra named branch' dev | |
|
89 | 70 | | |
|
90 |
|
|
|
71 | o 4: 'H' | |
|
72 | | | |
|
73 | | o 3: 'G' | |
|
91 | 74 | |/| |
|
92 |
o | |
|
|
75 | o | 2: 'F' | |
|
93 | 76 | | | |
|
94 |
| o |
|
|
77 | | o 1: 'E' | |
|
95 | 78 | |/ |
|
96 |
|
|
|
79 | o 0: 'A' | |
|
80 | ||
|
81 | $ hg rebase -s 4 -d 5 | |
|
82 | abort: source is ancestor of destination | |
|
83 | [255] | |
|
84 | ||
|
85 | $ hg rebase -s 5 -d 4 | |
|
86 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) | |
|
87 | ||
|
88 | $ hg tglog | |
|
89 | @ 8: 'D' | |
|
90 | | | |
|
91 | o 7: 'C' | |
|
92 | | | |
|
93 | o 6: 'B' | |
|
94 | | | |
|
95 | o 5: 'extra named branch' | |
|
96 | | | |
|
97 | o 4: 'H' | |
|
98 | | | |
|
99 | | o 3: 'G' | |
|
100 | |/| | |
|
101 | o | 2: 'F' | |
|
102 | | | | |
|
103 | | o 1: 'E' | |
|
97 | 104 | |/ |
|
98 | 105 | o 0: 'A' |
|
99 | 106 | |
|
100 | 107 | $ cd .. |
|
101 | ||
|
102 | Rebasing descendant onto ancestor across the same named branches | |
|
103 | ||
|
104 | $ hg clone -q -u . a a2 | |
|
105 | ||
|
106 | $ cd a2 | |
|
107 | ||
|
108 | $ echo x > x | |
|
109 | ||
|
110 | $ hg add x | |
|
111 | ||
|
112 | $ hg ci -m 'G' | |
|
113 | ||
|
114 | $ hg tglog | |
|
115 | @ 6: 'G' | |
|
116 | | | |
|
117 | o 5: 'F' | |
|
118 | | | |
|
119 | | o 4: 'E' | |
|
120 | |/| | |
|
121 | o | 3: 'D' | |
|
122 | | | | |
|
123 | | o 2: 'C' | |
|
124 | |/ | |
|
125 | | o 1: 'B' | |
|
126 | |/ | |
|
127 | o 0: 'A' | |
|
128 | ||
|
129 | $ hg rebase -s 6 -d 5 | |
|
130 | abort: source is descendant of destination | |
|
131 | [255] | |
|
132 | ||
|
133 | $ cd .. | |
|
134 | ||
|
135 | Rebasing ancestor onto descendant across different named branches | |
|
136 | ||
|
137 | $ hg clone -q -u . a a3 | |
|
138 | ||
|
139 | $ cd a3 | |
|
140 | ||
|
141 | $ hg branch dev | |
|
142 | marked working directory as branch dev | |
|
143 | ||
|
144 | $ echo x > x | |
|
145 | ||
|
146 | $ hg add x | |
|
147 | ||
|
148 | $ hg ci -m 'extra named branch' | |
|
149 | ||
|
150 | $ hg tglog | |
|
151 | @ 6: 'extra named branch' dev | |
|
152 | | | |
|
153 | o 5: 'F' | |
|
154 | | | |
|
155 | | o 4: 'E' | |
|
156 | |/| | |
|
157 | o | 3: 'D' | |
|
158 | | | | |
|
159 | | o 2: 'C' | |
|
160 | |/ | |
|
161 | | o 1: 'B' | |
|
162 | |/ | |
|
163 | o 0: 'A' | |
|
164 | ||
|
165 | $ hg rebase -s 5 -d 6 | |
|
166 | abort: source is ancestor of destination | |
|
167 | [255] | |
|
168 | ||
|
169 | $ cd .. | |
|
170 | ||
|
171 |
@@ -10,60 +10,37 b'' | |||
|
10 | 10 | |
|
11 | 11 | $ hg init a |
|
12 | 12 | $ cd a |
|
13 | ||
|
14 | $ echo c1 > c1 | |
|
15 | $ hg ci -Am c1 | |
|
16 |
adding |
|
|
17 | ||
|
18 | $ echo c2 > c2 | |
|
19 | $ hg ci -Am c2 | |
|
20 | adding c2 | |
|
21 | ||
|
22 | $ echo c3 > c3 | |
|
23 | $ hg ci -Am c3 | |
|
24 | adding c3 | |
|
25 | ||
|
26 | $ hg up -q -C 1 | |
|
13 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
|
14 | adding changesets | |
|
15 | adding manifests | |
|
16 | adding file changes | |
|
17 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
|
18 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
19 | $ hg up tip | |
|
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
27 | 21 | |
|
28 |
$ echo |
|
|
29 |
$ hg ci -Am |
|
|
30 |
adding |
|
|
31 | created new head | |
|
32 | ||
|
33 | $ echo l2 > l2 | |
|
34 | $ hg ci -Am l2 | |
|
35 | adding l2 | |
|
36 | ||
|
37 | $ echo l3 > l3 | |
|
38 | $ hg ci -Am l3 | |
|
39 | adding l3 | |
|
40 | ||
|
41 | $ hg up -q -C 2 | |
|
42 | ||
|
43 | $ echo r1 > r1 | |
|
44 | $ hg ci -Am r1 | |
|
45 | adding r1 | |
|
46 | ||
|
47 | $ echo r2 > r2 | |
|
48 | $ hg ci -Am r2 | |
|
49 | adding r2 | |
|
22 | $ echo I > I | |
|
23 | $ hg ci -AmI | |
|
24 | adding I | |
|
50 | 25 | |
|
51 | 26 | $ hg tglog |
|
52 |
@ |
|
|
27 | @ 8: 'I' | |
|
53 | 28 | | |
|
54 |
o |
|
|
29 | o 7: 'H' | |
|
55 | 30 | | |
|
56 |
| o |
|
|
57 |
| |
|
|
58 |
| |
|
|
31 | | o 6: 'G' | |
|
32 | |/| | |
|
33 | o | 5: 'F' | |
|
59 | 34 | | | |
|
60 |
| o |
|
|
61 | | | | |
|
62 | o | 2: 'c3' | |
|
35 | | o 4: 'E' | |
|
63 | 36 | |/ |
|
64 |
o |
|
|
65 | | | |
|
66 |
o |
|
|
37 | | o 3: 'D' | |
|
38 | | | | |
|
39 | | o 2: 'C' | |
|
40 | | | | |
|
41 | | o 1: 'B' | |
|
42 | |/ | |
|
43 | o 0: 'A' | |
|
67 | 44 | |
|
68 | 45 | $ cd .. |
|
69 | 46 | |
@@ -73,6 +50,10 b' These fail:' | |||
|
73 | 50 | $ hg clone -q -u . a a1 |
|
74 | 51 | $ cd a1 |
|
75 | 52 | |
|
53 | $ hg rebase -s 8 -d 7 | |
|
54 | abort: source is descendant of destination | |
|
55 | [255] | |
|
56 | ||
|
76 | 57 | $ hg rebase --continue --abort |
|
77 | 58 | abort: cannot use both abort and continue |
|
78 | 59 | [255] |
@@ -93,7 +74,7 b' These fail:' | |||
|
93 | 74 | nothing to rebase |
|
94 | 75 | [1] |
|
95 | 76 | |
|
96 |
$ hg up -q |
|
|
77 | $ hg up -q 7 | |
|
97 | 78 | |
|
98 | 79 | $ hg rebase |
|
99 | 80 | nothing to rebase |
@@ -102,29 +83,31 b' These fail:' | |||
|
102 | 83 | |
|
103 | 84 | These work: |
|
104 | 85 | |
|
105 |
Rebase with no arguments (from 3 onto |
|
|
86 | Rebase with no arguments (from 3 onto 8): | |
|
106 | 87 | |
|
107 |
$ hg up -q -C |
|
|
88 | $ hg up -q -C 3 | |
|
108 | 89 | |
|
109 | 90 | $ hg rebase |
|
110 | 91 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) |
|
111 | 92 | |
|
112 | 93 | $ hg tglog |
|
113 |
@ |
|
|
94 | @ 8: 'D' | |
|
114 | 95 | | |
|
115 |
o |
|
|
96 | o 7: 'C' | |
|
116 | 97 | | |
|
117 |
o |
|
|
98 | o 6: 'B' | |
|
118 | 99 | | |
|
119 |
o |
|
|
100 | o 5: 'I' | |
|
120 | 101 | | |
|
121 |
o |
|
|
122 | | | |
|
123 | o 2: 'c3' | |
|
102 | o 4: 'H' | |
|
124 | 103 | | |
|
125 |
o |
|
|
126 | | | |
|
127 |
o |
|
|
104 | | o 3: 'G' | |
|
105 | |/| | |
|
106 | o | 2: 'F' | |
|
107 | | | | |
|
108 | | o 1: 'E' | |
|
109 | |/ | |
|
110 | o 0: 'A' | |
|
128 | 111 | |
|
129 | 112 | Try to rollback after a rebase (fail): |
|
130 | 113 | |
@@ -135,198 +118,212 b' Try to rollback after a rebase (fail):' | |||
|
135 | 118 | $ cd .. |
|
136 | 119 | |
|
137 | 120 | |
|
138 |
Rebase with base == '.' => same as no arguments (from 3 onto |
|
|
121 | Rebase with base == '.' => same as no arguments (from 3 onto 8): | |
|
139 | 122 | |
|
140 |
$ hg clone -q -u |
|
|
123 | $ hg clone -q -u 3 a a2 | |
|
141 | 124 | $ cd a2 |
|
142 | 125 | |
|
143 | 126 | $ hg rebase --base . |
|
144 | 127 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) |
|
145 | 128 | |
|
146 | 129 | $ hg tglog |
|
147 |
@ |
|
|
130 | @ 8: 'D' | |
|
148 | 131 | | |
|
149 |
o |
|
|
132 | o 7: 'C' | |
|
150 | 133 | | |
|
151 |
o |
|
|
134 | o 6: 'B' | |
|
152 | 135 | | |
|
153 |
o |
|
|
136 | o 5: 'I' | |
|
154 | 137 | | |
|
155 |
o |
|
|
156 | | | |
|
157 | o 2: 'c3' | |
|
138 | o 4: 'H' | |
|
158 | 139 | | |
|
159 |
o |
|
|
160 | | | |
|
161 |
o |
|
|
140 | | o 3: 'G' | |
|
141 | |/| | |
|
142 | o | 2: 'F' | |
|
143 | | | | |
|
144 | | o 1: 'E' | |
|
145 | |/ | |
|
146 | o 0: 'A' | |
|
162 | 147 | |
|
163 | 148 | $ cd .. |
|
164 | 149 | |
|
165 | 150 | |
|
166 |
Rebase with dest == `hg branch` => same as no arguments (from 3 onto |
|
|
151 | Rebase with dest == `hg branch` => same as no arguments (from 3 onto 8): | |
|
167 | 152 | |
|
168 |
$ hg clone -q -u |
|
|
153 | $ hg clone -q -u 3 a a3 | |
|
169 | 154 | $ cd a3 |
|
170 | 155 | |
|
171 | 156 | $ hg rebase --dest `hg branch` |
|
172 | 157 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) |
|
173 | 158 | |
|
174 | 159 | $ hg tglog |
|
175 |
@ |
|
|
160 | @ 8: 'D' | |
|
176 | 161 | | |
|
177 |
o |
|
|
162 | o 7: 'C' | |
|
178 | 163 | | |
|
179 |
o |
|
|
164 | o 6: 'B' | |
|
180 | 165 | | |
|
181 |
o |
|
|
166 | o 5: 'I' | |
|
182 | 167 | | |
|
183 |
o |
|
|
184 | | | |
|
185 | o 2: 'c3' | |
|
168 | o 4: 'H' | |
|
186 | 169 | | |
|
187 |
o |
|
|
188 | | | |
|
189 |
o |
|
|
170 | | o 3: 'G' | |
|
171 | |/| | |
|
172 | o | 2: 'F' | |
|
173 | | | | |
|
174 | | o 1: 'E' | |
|
175 | |/ | |
|
176 | o 0: 'A' | |
|
190 | 177 | |
|
191 | 178 | $ cd .. |
|
192 | 179 | |
|
193 | 180 | |
|
194 |
Specify only source (from |
|
|
181 | Specify only source (from 2 onto 8): | |
|
195 | 182 | |
|
196 | 183 | $ hg clone -q -u . a a4 |
|
197 | 184 | $ cd a4 |
|
198 | 185 | |
|
199 |
$ hg rebase --source |
|
|
186 | $ hg rebase --source 2 | |
|
200 | 187 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob) |
|
201 | 188 | |
|
202 | 189 | $ hg tglog |
|
203 |
@ |
|
|
190 | @ 8: 'D' | |
|
204 | 191 | | |
|
205 |
o |
|
|
192 | o 7: 'C' | |
|
206 | 193 | |\ |
|
207 |
| o |
|
|
194 | | o 6: 'I' | |
|
208 | 195 | | | |
|
209 |
| o |
|
|
196 | | o 5: 'H' | |
|
210 | 197 | | | |
|
211 |
|
|
|
212 | | | | |
|
213 |
| o |
|
|
198 | | | o 4: 'G' | |
|
199 | | |/| | |
|
200 | | o | 3: 'F' | |
|
201 | | | | | |
|
202 | | | o 2: 'E' | |
|
203 | | |/ | |
|
204 | o | 1: 'B' | |
|
214 | 205 | |/ |
|
215 |
o |
|
|
216 | | | |
|
217 | o 0: 'c1' | |
|
206 | o 0: 'A' | |
|
218 | 207 | |
|
219 | 208 | $ cd .. |
|
220 | 209 | |
|
221 | 210 | |
|
222 | 211 | Specify only dest (from 3 onto 6): |
|
223 | 212 | |
|
224 |
$ hg clone -q -u |
|
|
213 | $ hg clone -q -u 3 a a5 | |
|
225 | 214 | $ cd a5 |
|
226 | 215 | |
|
227 | 216 | $ hg rebase --dest 6 |
|
228 | 217 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob) |
|
229 | 218 | |
|
230 | 219 | $ hg tglog |
|
231 |
@ |
|
|
220 | @ 8: 'D' | |
|
232 | 221 | | |
|
233 |
o |
|
|
222 | o 7: 'C' | |
|
223 | | | |
|
224 | o 6: 'B' | |
|
234 | 225 | | |
|
235 |
o 5: ' |
|
|
236 | | | |
|
237 |
| o 4: ' |
|
|
226 | | o 5: 'I' | |
|
227 | | | | |
|
228 | | o 4: 'H' | |
|
229 | | | | |
|
230 | o | 3: 'G' | |
|
231 | |\| | |
|
232 | | o 2: 'F' | |
|
233 | | | | |
|
234 | o | 1: 'E' | |
|
238 | 235 | |/ |
|
239 |
o |
|
|
240 | | | |
|
241 | o 2: 'c3' | |
|
242 | | | |
|
243 | o 1: 'c2' | |
|
244 | | | |
|
245 | o 0: 'c1' | |
|
236 | o 0: 'A' | |
|
246 | 237 | |
|
247 | 238 | $ cd .. |
|
248 | 239 | |
|
249 | 240 | |
|
250 |
Specify only base (from |
|
|
241 | Specify only base (from 1 onto 8): | |
|
251 | 242 | |
|
252 | 243 | $ hg clone -q -u . a a6 |
|
253 | 244 | $ cd a6 |
|
254 | 245 | |
|
255 |
$ hg rebase --base |
|
|
246 | $ hg rebase --base 3 | |
|
256 | 247 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob) |
|
257 | 248 | |
|
258 | 249 | $ hg tglog |
|
259 |
@ |
|
|
250 | @ 8: 'D' | |
|
260 | 251 | | |
|
261 |
o |
|
|
252 | o 7: 'C' | |
|
262 | 253 | | |
|
263 |
o |
|
|
254 | o 6: 'B' | |
|
264 | 255 | | |
|
265 |
o |
|
|
256 | o 5: 'I' | |
|
266 | 257 | | |
|
267 |
o |
|
|
268 | | | |
|
269 | o 2: 'c3' | |
|
258 | o 4: 'H' | |
|
270 | 259 | | |
|
271 |
o |
|
|
272 | | | |
|
273 |
o |
|
|
260 | | o 3: 'G' | |
|
261 | |/| | |
|
262 | o | 2: 'F' | |
|
263 | | | | |
|
264 | | o 1: 'E' | |
|
265 | |/ | |
|
266 | o 0: 'A' | |
|
274 | 267 | |
|
275 | 268 | $ cd .. |
|
276 | 269 | |
|
277 | 270 | |
|
278 |
Specify source and dest (from |
|
|
271 | Specify source and dest (from 2 onto 7): | |
|
279 | 272 | |
|
280 | 273 | $ hg clone -q -u . a a7 |
|
281 | 274 | $ cd a7 |
|
282 | 275 | |
|
283 |
$ hg rebase --source |
|
|
276 | $ hg rebase --detach --source 2 --dest 7 | |
|
284 | 277 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/*-backup.hg (glob) |
|
285 | 278 | |
|
286 | 279 | $ hg tglog |
|
287 |
@ |
|
|
280 | @ 8: 'D' | |
|
281 | | | |
|
282 | o 7: 'C' | |
|
288 | 283 | | |
|
289 |
o |
|
|
290 |
| |
|
|
291 |
|
|
|
292 |
| |
|
|
293 |
| o 4: ' |
|
|
284 | | o 6: 'I' | |
|
285 | |/ | |
|
286 | o 5: 'H' | |
|
287 | | | |
|
288 | | o 4: 'G' | |
|
289 | |/| | |
|
290 | o | 3: 'F' | |
|
294 | 291 | | | |
|
295 |
o |
|
|
296 | | | | |
|
297 | | o 2: 'c3' | |
|
292 | | o 2: 'E' | |
|
298 | 293 | |/ |
|
299 |
o 1: ' |
|
|
300 | | | |
|
301 |
o 0: ' |
|
|
294 | | o 1: 'B' | |
|
295 | |/ | |
|
296 | o 0: 'A' | |
|
302 | 297 | |
|
303 | 298 | $ cd .. |
|
304 | 299 | |
|
305 | 300 | |
|
306 |
Specify base and dest (from |
|
|
301 | Specify base and dest (from 1 onto 7): | |
|
307 | 302 | |
|
308 | 303 | $ hg clone -q -u . a a8 |
|
309 | 304 | $ cd a8 |
|
310 | 305 | |
|
311 |
$ hg rebase --base |
|
|
306 | $ hg rebase --base 3 --dest 7 | |
|
312 | 307 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/*-backup.hg (glob) |
|
313 | 308 | |
|
314 | 309 | $ hg tglog |
|
315 |
@ |
|
|
310 | @ 8: 'D' | |
|
316 | 311 | | |
|
317 |
o |
|
|
312 | o 7: 'C' | |
|
318 | 313 | | |
|
319 |
o |
|
|
314 | o 6: 'B' | |
|
320 | 315 | | |
|
321 |
| o |
|
|
316 | | o 5: 'I' | |
|
322 | 317 | |/ |
|
323 |
o |
|
|
324 | | | |
|
325 | o 2: 'c3' | |
|
318 | o 4: 'H' | |
|
326 | 319 | | |
|
327 |
o |
|
|
328 | | | |
|
329 |
o |
|
|
320 | | o 3: 'G' | |
|
321 | |/| | |
|
322 | o | 2: 'F' | |
|
323 | | | | |
|
324 | | o 1: 'E' | |
|
325 | |/ | |
|
326 | o 0: 'A' | |
|
330 | 327 | |
|
331 | 328 | $ cd .. |
|
332 | 329 |
@@ -10,122 +10,111 b'' | |||
|
10 | 10 | |
|
11 | 11 | $ hg init a |
|
12 | 12 | $ cd a |
|
13 | ||
|
14 | $ echo A > A | |
|
15 | $ hg ci -Am A | |
|
16 | adding A | |
|
17 | ||
|
18 | $ echo B > B | |
|
19 | $ hg ci -Am B | |
|
20 | adding B | |
|
21 | ||
|
22 | $ hg up -q -C 0 | |
|
23 | ||
|
24 | $ echo C > C | |
|
25 | $ hg ci -Am C | |
|
26 | adding C | |
|
27 | created new head | |
|
28 | ||
|
29 | $ hg up -q -C 0 | |
|
30 | ||
|
31 | $ echo D > D | |
|
32 | $ hg ci -Am D | |
|
33 | adding D | |
|
34 | created new head | |
|
35 | ||
|
36 | $ hg merge -r 2 | |
|
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
38 | (branch merge, don't forget to commit) | |
|
39 | ||
|
40 | $ hg ci -m E | |
|
41 | ||
|
42 | $ hg up -q -C 3 | |
|
43 | ||
|
44 | $ echo F > F | |
|
45 | $ hg ci -Am F | |
|
46 | adding F | |
|
47 | created new head | |
|
48 | ||
|
13 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
|
14 | adding changesets | |
|
15 | adding manifests | |
|
16 | adding file changes | |
|
17 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
|
18 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
19 | $ hg up tip | |
|
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
49 | 21 | $ cd .. |
|
50 | 22 | |
|
51 | 23 | |
|
52 | 24 | Rebasing |
|
53 |
|
|
|
25 | D onto H - simple rebase: | |
|
54 | 26 | |
|
55 | 27 | $ hg clone -q -u . a a1 |
|
56 | 28 | $ cd a1 |
|
57 | 29 | |
|
58 | 30 | $ hg tglog |
|
59 |
@ |
|
|
31 | @ 7: 'H' | |
|
60 | 32 | | |
|
33 | | o 6: 'G' | |
|
34 | |/| | |
|
35 | o | 5: 'F' | |
|
36 | | | | |
|
61 | 37 | | o 4: 'E' |
|
62 |
|/ |
|
|
63 |
|
|
|
38 | |/ | |
|
39 | | o 3: 'D' | |
|
64 | 40 | | | |
|
65 | 41 | | o 2: 'C' |
|
66 |
| |
|
|
42 | | | | |
|
67 | 43 | | o 1: 'B' |
|
68 | 44 | |/ |
|
69 | 45 | o 0: 'A' |
|
70 | 46 | |
|
71 | $ hg rebase -s 1 -d 5 | |
|
47 | ||
|
48 | $ hg rebase -s 3 -d 7 | |
|
72 | 49 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) |
|
73 | 50 | |
|
74 | 51 | $ hg tglog |
|
75 |
@ |
|
|
76 | | | |
|
77 |
|
|
|
78 | | | |
|
79 | | o 3: 'E' | |
|
80 | |/| | |
|
81 | o | 2: 'D' | |
|
52 | @ 7: 'D' | |
|
53 | |\ | |
|
54 | | o 6: 'H' | |
|
82 | 55 | | | |
|
83 |
| |
|
|
56 | | | o 5: 'G' | |
|
57 | | |/| | |
|
58 | | o | 4: 'F' | |
|
59 | | | | | |
|
60 | | | o 3: 'E' | |
|
61 | | |/ | |
|
62 | o | 2: 'C' | |
|
63 | | | | |
|
64 | o | 1: 'B' | |
|
84 | 65 | |/ |
|
85 | 66 | o 0: 'A' |
|
86 | 67 | |
|
87 | 68 | $ cd .. |
|
88 | 69 | |
|
89 | 70 | |
|
90 |
|
|
|
71 | D onto F - intermediate point: | |
|
91 | 72 | |
|
92 | 73 | $ hg clone -q -u . a a2 |
|
93 | 74 | $ cd a2 |
|
94 | 75 | |
|
95 |
$ hg rebase -s |
|
|
76 | $ hg rebase -s 3 -d 5 | |
|
96 | 77 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) |
|
97 | 78 | |
|
98 | 79 | $ hg tglog |
|
99 |
@ |
|
|
100 | | | |
|
101 |
| |
|
|
102 | |/ | |
|
103 |
| |
|
|
104 | |/| | |
|
105 |
|
|
|
80 | @ 7: 'D' | |
|
81 | |\ | |
|
82 | | | o 6: 'H' | |
|
83 | | |/ | |
|
84 | | | o 5: 'G' | |
|
85 | | |/| | |
|
86 | | o | 4: 'F' | |
|
87 | | | | | |
|
88 | | | o 3: 'E' | |
|
89 | | |/ | |
|
90 | o | 2: 'C' | |
|
106 | 91 | | | |
|
107 |
|
|
|
92 | o | 1: 'B' | |
|
108 | 93 | |/ |
|
109 | 94 | o 0: 'A' |
|
110 | 95 | |
|
111 | 96 | $ cd .. |
|
112 | 97 | |
|
113 | 98 | |
|
114 |
|
|
|
99 | E onto H - skip of G: | |
|
115 | 100 | |
|
116 | 101 | $ hg clone -q -u . a a3 |
|
117 | 102 | $ cd a3 |
|
118 | 103 | |
|
119 |
$ hg rebase -s |
|
|
104 | $ hg rebase -s 4 -d 7 | |
|
120 | 105 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) |
|
121 | 106 | |
|
122 | 107 | $ hg tglog |
|
123 |
@ |
|
|
108 | @ 6: 'E' | |
|
109 | | | |
|
110 | o 5: 'H' | |
|
124 | 111 | | |
|
125 |
o |
|
|
112 | o 4: 'F' | |
|
126 | 113 | | |
|
127 |
|
|
|
128 | | | |
|
114 | | o 3: 'D' | |
|
115 | | | | |
|
116 | | o 2: 'C' | |
|
117 | | | | |
|
129 | 118 | | o 1: 'B' |
|
130 | 119 | |/ |
|
131 | 120 | o 0: 'A' |
@@ -133,21 +122,25 b' C onto F - skip of E:' | |||
|
133 | 122 | $ cd .. |
|
134 | 123 | |
|
135 | 124 | |
|
136 |
|
|
|
125 | F onto E - rebase of a branching point (skip G): | |
|
137 | 126 | |
|
138 | 127 | $ hg clone -q -u . a a4 |
|
139 | 128 | $ cd a4 |
|
140 | 129 | |
|
141 |
$ hg rebase -s |
|
|
130 | $ hg rebase -s 5 -d 4 | |
|
142 | 131 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob) |
|
143 | 132 | |
|
144 | 133 | $ hg tglog |
|
145 |
@ |
|
|
134 | @ 6: 'H' | |
|
135 | | | |
|
136 | o 5: 'F' | |
|
146 | 137 | | |
|
147 |
o |
|
|
138 | o 4: 'E' | |
|
148 | 139 | | |
|
149 |
|
|
|
150 | | | |
|
140 | | o 3: 'D' | |
|
141 | | | | |
|
142 | | o 2: 'C' | |
|
143 | | | | |
|
151 | 144 | | o 1: 'B' |
|
152 | 145 | |/ |
|
153 | 146 | o 0: 'A' |
@@ -155,23 +148,27 b' D onto C - rebase of a branching point (' | |||
|
155 | 148 | $ cd .. |
|
156 | 149 | |
|
157 | 150 | |
|
158 |
|
|
|
151 | G onto H - merged revision having a parent in ancestors of target: | |
|
159 | 152 | |
|
160 | 153 | $ hg clone -q -u . a a5 |
|
161 | 154 | $ cd a5 |
|
162 | 155 | |
|
163 |
$ hg rebase -s |
|
|
156 | $ hg rebase -s 6 -d 7 | |
|
164 | 157 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob) |
|
165 | 158 | |
|
166 | 159 | $ hg tglog |
|
167 |
@ |
|
|
160 | @ 7: 'G' | |
|
168 | 161 | |\ |
|
169 |
| o |
|
|
162 | | o 6: 'H' | |
|
170 | 163 | | | |
|
164 | | o 5: 'F' | |
|
165 | | | | |
|
166 | o | 4: 'E' | |
|
167 | |/ | |
|
171 | 168 | | o 3: 'D' |
|
172 | 169 | | | |
|
173 |
|
|
|
174 |
| |
|
|
170 | | o 2: 'C' | |
|
171 | | | | |
|
175 | 172 | | o 1: 'B' |
|
176 | 173 | |/ |
|
177 | 174 | o 0: 'A' |
@@ -179,22 +176,26 b' E onto F - merged revision having a pare' | |||
|
179 | 176 | $ cd .. |
|
180 | 177 | |
|
181 | 178 | |
|
182 |
|
|
|
179 | F onto B - G maintains E as parent: | |
|
183 | 180 | |
|
184 | 181 | $ hg clone -q -u . a a6 |
|
185 | 182 | $ cd a6 |
|
186 | 183 | |
|
187 |
$ hg rebase -s |
|
|
184 | $ hg rebase -s 5 -d 1 | |
|
188 | 185 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob) |
|
189 | 186 | |
|
190 | 187 | $ hg tglog |
|
191 |
@ |
|
|
188 | @ 7: 'H' | |
|
192 | 189 | | |
|
193 |
| o |
|
|
190 | | o 6: 'G' | |
|
194 | 191 | |/| |
|
195 |
o | |
|
|
192 | o | 5: 'F' | |
|
193 | | | | |
|
194 | | o 4: 'E' | |
|
196 | 195 | | | |
|
197 |
| |
|
|
196 | | | o 3: 'D' | |
|
197 | | | | | |
|
198 | +---o 2: 'C' | |
|
198 | 199 | | | |
|
199 | 200 | o | 1: 'B' |
|
200 | 201 | |/ |
@@ -205,45 +206,45 b' D onto B - E maintains C as parent:' | |||
|
205 | 206 | |
|
206 | 207 | These will fail (using --source): |
|
207 | 208 | |
|
208 |
|
|
|
209 | G onto F - rebase onto an ancestor: | |
|
209 | 210 | |
|
210 | 211 | $ hg clone -q -u . a a7 |
|
211 | 212 | $ cd a7 |
|
212 | 213 | |
|
213 |
$ hg rebase -s |
|
|
214 | $ hg rebase -s 6 -d 5 | |
|
214 | 215 | abort: source is descendant of destination |
|
215 | 216 | [255] |
|
216 | 217 | |
|
217 |
|
|
|
218 | F onto G - rebase onto a descendant: | |
|
218 | 219 | |
|
219 |
$ hg rebase -s |
|
|
220 | $ hg rebase -s 5 -d 6 | |
|
220 | 221 | abort: source is ancestor of destination |
|
221 | 222 | [255] |
|
222 | 223 | |
|
223 |
|
|
|
224 | G onto B - merge revision with both parents not in ancestors of target: | |
|
224 | 225 | |
|
225 |
$ hg rebase -s |
|
|
226 |
abort: cannot use revision |
|
|
226 | $ hg rebase -s 6 -d 1 | |
|
227 | abort: cannot use revision 6 as base, result would have 3 parents | |
|
227 | 228 | [255] |
|
228 | 229 | |
|
229 | 230 | |
|
230 | 231 | These will abort gracefully (using --base): |
|
231 | 232 | |
|
232 |
|
|
|
233 | G onto G - rebase onto same changeset: | |
|
233 | 234 | |
|
234 |
$ hg rebase -b |
|
|
235 | $ hg rebase -b 6 -d 6 | |
|
235 | 236 | nothing to rebase |
|
236 | 237 | [1] |
|
237 | 238 | |
|
238 |
|
|
|
239 | G onto F - rebase onto an ancestor: | |
|
239 | 240 | |
|
240 |
$ hg rebase -b |
|
|
241 | $ hg rebase -b 6 -d 5 | |
|
241 | 242 | nothing to rebase |
|
242 | 243 | [1] |
|
243 | 244 | |
|
244 |
|
|
|
245 | F onto G - rebase onto a descendant: | |
|
245 | 246 | |
|
246 |
$ hg rebase -b |
|
|
247 | $ hg rebase -b 5 -d 6 | |
|
247 | 248 | nothing to rebase |
|
248 | 249 | [1] |
|
249 | 250 |
@@ -22,83 +22,19 b' This test tries to exercise the ssh func' | |||
|
22 | 22 | > r = os.system(sys.argv[2]) |
|
23 | 23 | > sys.exit(bool(r)) |
|
24 | 24 | > EOF |
|
25 | $ hg init remote | |
|
26 | $ cd remote | |
|
27 | 25 | |
|
28 | 26 | creating 'remote |
|
29 | 27 | |
|
30 | $ cat >>afile <<EOF | |
|
31 | > 0 | |
|
32 | > EOF | |
|
33 | $ hg add afile | |
|
34 | $ hg commit -m "0.0" | |
|
35 | $ cat >>afile <<EOF | |
|
36 | > 1 | |
|
37 | > EOF | |
|
38 | $ hg commit -m "0.1" | |
|
39 | $ cat >>afile <<EOF | |
|
40 | > 2 | |
|
41 | > EOF | |
|
42 | $ hg commit -m "0.2" | |
|
43 | $ cat >>afile <<EOF | |
|
44 | > 3 | |
|
45 | > EOF | |
|
46 | $ hg commit -m "0.3" | |
|
47 | $ hg update -C 0 | |
|
28 | $ hg init remote | |
|
29 | $ cd remote | |
|
30 | $ hg unbundle $TESTDIR/bundles/remote.hg | |
|
31 | adding changesets | |
|
32 | adding manifests | |
|
33 | adding file changes | |
|
34 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
|
35 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
36 | $ hg up tip | |
|
48 | 37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
49 | $ cat >>afile <<EOF | |
|
50 | > 1 | |
|
51 | > EOF | |
|
52 | $ hg commit -m "1.1" | |
|
53 | created new head | |
|
54 | $ cat >>afile <<EOF | |
|
55 | > 2 | |
|
56 | > EOF | |
|
57 | $ hg commit -m "1.2" | |
|
58 | $ cat >fred <<EOF | |
|
59 | > a line | |
|
60 | > EOF | |
|
61 | $ cat >>afile <<EOF | |
|
62 | > 3 | |
|
63 | > EOF | |
|
64 | $ hg add fred | |
|
65 | $ hg commit -m "1.3" | |
|
66 | $ hg mv afile adifferentfile | |
|
67 | $ hg commit -m "1.3m" | |
|
68 | $ hg update -C 3 | |
|
69 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
|
70 | $ hg mv afile anotherfile | |
|
71 | $ hg commit -m "0.3m" | |
|
72 | $ hg debugindex .hg/store/data/afile.i | |
|
73 | rev offset length base linkrev nodeid p1 p2 | |
|
74 | 0 0 3 0 0 362fef284ce2 000000000000 000000000000 | |
|
75 | 1 3 5 1 1 125144f7e028 362fef284ce2 000000000000 | |
|
76 | 2 8 7 2 2 4c982badb186 125144f7e028 000000000000 | |
|
77 | 3 15 9 3 3 19b1fc555737 4c982badb186 000000000000 | |
|
78 | $ hg debugindex .hg/store/data/adifferentfile.i | |
|
79 | rev offset length base linkrev nodeid p1 p2 | |
|
80 | 0 0 75 0 7 2565f3199a74 000000000000 000000000000 | |
|
81 | $ hg debugindex .hg/store/data/anotherfile.i | |
|
82 | rev offset length base linkrev nodeid p1 p2 | |
|
83 | 0 0 75 0 8 2565f3199a74 000000000000 000000000000 | |
|
84 | $ hg debugindex .hg/store/data/fred.i | |
|
85 | rev offset length base linkrev nodeid p1 p2 | |
|
86 | 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000 | |
|
87 | $ hg debugindex .hg/store/00manifest.i | |
|
88 | rev offset length base linkrev nodeid p1 p2 | |
|
89 | 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000 | |
|
90 | 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000 | |
|
91 | 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000 | |
|
92 | 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000 | |
|
93 | 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 | |
|
94 | 5 250 68 3 7 09bb521d218d de68e904d169 000000000000 | |
|
95 | 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000 | |
|
96 | $ hg verify | |
|
97 | checking changesets | |
|
98 | checking manifests | |
|
99 | crosschecking files in changesets and manifests | |
|
100 | checking files | |
|
101 | 4 files, 9 changesets, 7 total revisions | |
|
102 | 38 | $ cd .. |
|
103 | 39 | |
|
104 | 40 | clone remote via stream |
@@ -2,6 +2,7 b' import os, sys, time' | |||
|
2 | 2 | from mercurial import hg, ui, commands |
|
3 | 3 | |
|
4 | 4 | TESTDIR = os.environ["TESTDIR"] |
|
5 | BUNDLEPATH = os.path.join(TESTDIR, 'bundles', 'test-no-symlinks.hg') | |
|
5 | 6 | |
|
6 | 7 | # only makes sense to test on os which supports symlinks |
|
7 | 8 | if not hasattr(os, "symlink"): |
@@ -9,7 +10,7 b' if not hasattr(os, "symlink"):' | |||
|
9 | 10 | |
|
10 | 11 | # clone with symlink support |
|
11 | 12 | u = ui.ui() |
|
12 | hg.clone(u, os.path.join(TESTDIR, 'test-no-symlinks.hg'), 'test0') | |
|
13 | hg.clone(u, BUNDLEPATH, 'test0') | |
|
13 | 14 | |
|
14 | 15 | repo = hg.repository(u, 'test0') |
|
15 | 16 | |
@@ -38,4 +39,4 b' commands.status(u, repo)' | |||
|
38 | 39 | |
|
39 | 40 | # try cloning a repo which contains symlinks |
|
40 | 41 | u = ui.ui() |
|
41 | hg.clone(u, os.path.join(TESTDIR, 'test-no-symlinks.hg'), 'test1') | |
|
42 | hg.clone(u, BUNDLEPATH, 'test1') |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now