Show More
@@ -6,6 +6,7 b' Test for the heuristic copytracing algor' | |||
|
6 | 6 | > cat >> $1/.hg/hgrc <<EOF |
|
7 | 7 | > [experimental] |
|
8 | 8 | > copytrace = heuristics |
|
9 | > copytrace.sourcecommitlimit = -1 | |
|
9 | 10 | > EOF |
|
10 | 11 | > } |
|
11 | 12 | > __EOF__ |
@@ -17,9 +18,16 b' Test for the heuristic copytracing algor' | |||
|
17 | 18 | > shelve= |
|
18 | 19 | > EOF |
|
19 | 20 | |
|
21 | NOTE: calling initclient() set copytrace.sourcecommitlimit=-1 as we want to | |
|
22 | prevent the full copytrace algorithm to run and test the heuristic algorithm | |
|
23 | without complexing the test cases with public and draft commits. | |
|
24 | ||
|
20 | 25 | Check filename heuristics (same dirname and same basename) |
|
21 | $ hg init server | |
|
22 | $ cd server | |
|
26 | ---------------------------------------------------------- | |
|
27 | ||
|
28 | $ hg init repo | |
|
29 | $ initclient repo | |
|
30 | $ cd repo | |
|
23 | 31 | $ echo a > a |
|
24 | 32 | $ mkdir dir |
|
25 | 33 | $ echo a > dir/file.txt |
@@ -30,22 +38,18 b' Check filename heuristics (same dirname ' | |||
|
30 | 38 | $ hg mv a b |
|
31 | 39 | $ hg mv -q dir dir2 |
|
32 | 40 | $ hg ci -m 'mv a b, mv dir/ dir2/' |
|
33 | $ cd .. | |
|
34 | $ hg clone -q server repo | |
|
35 | $ initclient repo | |
|
36 | $ cd repo | |
|
37 | 41 | $ hg up -q 0 |
|
38 | 42 | $ echo b > a |
|
39 | 43 | $ echo b > dir/file.txt |
|
40 | 44 | $ hg ci -qm 'mod a, mod dir/file.txt' |
|
41 | 45 | |
|
42 |
$ hg log -G -T 'changeset: {node}\n desc: {desc} |
|
|
46 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
43 | 47 | @ changeset: 557f403c0afd2a3cf15d7e2fb1f1001a8b85e081 |
|
44 |
| desc: mod a, mod dir/file.txt |
|
|
48 | | desc: mod a, mod dir/file.txt | |
|
45 | 49 | | o changeset: 928d74bc9110681920854d845c06959f6dfc9547 |
|
46 |
|/ desc: mv a b, mv dir/ dir2/ |
|
|
50 | |/ desc: mv a b, mv dir/ dir2/ | |
|
47 | 51 | o changeset: 3c482b16e54596fed340d05ffaf155f156cda7ee |
|
48 |
desc: initial |
|
|
52 | desc: initial | |
|
49 | 53 | |
|
50 | 54 | $ hg rebase -s . -d 1 |
|
51 | 55 | rebasing 2:557f403c0afd "mod a, mod dir/file.txt" (tip) |
@@ -53,12 +57,14 b' Check filename heuristics (same dirname ' | |||
|
53 | 57 | merging dir2/file.txt and dir/file.txt to dir2/file.txt |
|
54 | 58 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/557f403c0afd-9926eeff-rebase.hg (glob) |
|
55 | 59 | $ cd .. |
|
56 | $ rm -rf server | |
|
57 | 60 | $ rm -rf repo |
|
58 | 61 | |
|
59 | 62 | Make sure filename heuristics do not when they are not related |
|
60 | $ hg init server | |
|
61 | $ cd server | |
|
63 | -------------------------------------------------------------- | |
|
64 | ||
|
65 | $ hg init repo | |
|
66 | $ initclient repo | |
|
67 | $ cd repo | |
|
62 | 68 | $ echo 'somecontent' > a |
|
63 | 69 | $ hg add a |
|
64 | 70 | $ hg ci -m initial |
@@ -66,21 +72,17 b' Make sure filename heuristics do not whe' | |||
|
66 | 72 | $ echo 'completelydifferentcontext' > b |
|
67 | 73 | $ hg add b |
|
68 | 74 | $ hg ci -m 'rm a, add b' |
|
69 | $ cd .. | |
|
70 | $ hg clone -q server repo | |
|
71 | $ initclient repo | |
|
72 | $ cd repo | |
|
73 | 75 | $ hg up -q 0 |
|
74 | 76 | $ printf 'somecontent\nmoarcontent' > a |
|
75 | 77 | $ hg ci -qm 'mode a' |
|
76 | 78 | |
|
77 |
$ hg log -G -T 'changeset: {node}\n desc: {desc} |
|
|
79 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
78 | 80 | @ changeset: d526312210b9e8f795d576a77dc643796384d86e |
|
79 |
| desc: mode a |
|
|
81 | | desc: mode a | |
|
80 | 82 | | o changeset: 46985f76c7e5e5123433527f5c8526806145650b |
|
81 |
|/ desc: rm a, add b |
|
|
83 | |/ desc: rm a, add b | |
|
82 | 84 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 |
|
83 |
desc: initial |
|
|
85 | desc: initial | |
|
84 | 86 | |
|
85 | 87 | $ hg rebase -s . -d 1 |
|
86 | 88 | rebasing 2:d526312210b9 "mode a" (tip) |
@@ -90,49 +92,14 b' Make sure filename heuristics do not whe' | |||
|
90 | 92 | [1] |
|
91 | 93 | |
|
92 | 94 | $ cd .. |
|
93 | $ rm -rf server | |
|
94 | 95 | $ rm -rf repo |
|
95 | 96 | |
|
96 | 97 | Test when lca didn't modified the file that was moved |
|
97 | $ hg init server | |
|
98 | $ cd server | |
|
99 | $ echo 'somecontent' > a | |
|
100 | $ hg add a | |
|
101 | $ hg ci -m initial | |
|
102 | $ echo c > c | |
|
103 | $ hg add c | |
|
104 | $ hg ci -m randomcommit | |
|
105 | $ hg mv a b | |
|
106 | $ hg ci -m 'mv a b' | |
|
107 | $ cd .. | |
|
108 | $ hg clone -q server repo | |
|
98 | ----------------------------------------------------- | |
|
99 | ||
|
100 | $ hg init repo | |
|
109 | 101 | $ initclient repo |
|
110 | 102 | $ cd repo |
|
111 | $ hg up -q 1 | |
|
112 | $ echo b > a | |
|
113 | $ hg ci -qm 'mod a' | |
|
114 | ||
|
115 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' | |
|
116 | @ changeset: 9d5cf99c3d9f8e8b05ba55421f7f56530cfcf3bc | |
|
117 | | desc: mod a, phase: draft | |
|
118 | | o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d | |
|
119 | |/ desc: mv a b, phase: public | |
|
120 | o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83 | |
|
121 | | desc: randomcommit, phase: public | |
|
122 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 | |
|
123 | desc: initial, phase: public | |
|
124 | ||
|
125 | $ hg rebase -s . -d 2 | |
|
126 | rebasing 3:9d5cf99c3d9f "mod a" (tip) | |
|
127 | merging b and a to b | |
|
128 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg (glob) | |
|
129 | $ cd .. | |
|
130 | $ rm -rf server | |
|
131 | $ rm -rf repo | |
|
132 | ||
|
133 | Rebase "backwards" | |
|
134 | $ hg init server | |
|
135 | $ cd server | |
|
136 | 103 | $ echo 'somecontent' > a |
|
137 | 104 | $ hg add a |
|
138 | 105 | $ hg ci -m initial |
@@ -141,65 +108,68 b' Rebase "backwards"' | |||
|
141 | 108 | $ hg ci -m randomcommit |
|
142 | 109 | $ hg mv a b |
|
143 | 110 | $ hg ci -m 'mv a b' |
|
111 | $ hg up -q 1 | |
|
112 | $ echo b > a | |
|
113 | $ hg ci -qm 'mod a' | |
|
114 | ||
|
115 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' | |
|
116 | @ changeset: 9d5cf99c3d9f8e8b05ba55421f7f56530cfcf3bc | |
|
117 | | desc: mod a, phase: draft | |
|
118 | | o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d | |
|
119 | |/ desc: mv a b, phase: draft | |
|
120 | o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83 | |
|
121 | | desc: randomcommit, phase: draft | |
|
122 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 | |
|
123 | desc: initial, phase: draft | |
|
124 | ||
|
125 | $ hg rebase -s . -d 2 | |
|
126 | rebasing 3:9d5cf99c3d9f "mod a" (tip) | |
|
127 | merging b and a to b | |
|
128 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg (glob) | |
|
144 | 129 | $ cd .. |
|
145 | $ hg clone -q server repo | |
|
130 | $ rm -rf repo | |
|
131 | ||
|
132 | Rebase "backwards" | |
|
133 | ------------------ | |
|
134 | ||
|
135 | $ hg init repo | |
|
146 | 136 | $ initclient repo |
|
147 | 137 | $ cd repo |
|
138 | $ echo 'somecontent' > a | |
|
139 | $ hg add a | |
|
140 | $ hg ci -m initial | |
|
141 | $ echo c > c | |
|
142 | $ hg add c | |
|
143 | $ hg ci -m randomcommit | |
|
144 | $ hg mv a b | |
|
145 | $ hg ci -m 'mv a b' | |
|
148 | 146 | $ hg up -q 2 |
|
149 | 147 | $ echo b > b |
|
150 | 148 | $ hg ci -qm 'mod b' |
|
151 | 149 | |
|
152 |
$ hg log -G -T 'changeset: {node}\n desc: {desc} |
|
|
150 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
153 | 151 | @ changeset: fbe97126b3969056795c462a67d93faf13e4d298 |
|
154 |
| desc: mod b |
|
|
152 | | desc: mod b | |
|
155 | 153 | o changeset: d760186dd240fc47b91eb9f0b58b0002aaeef95d |
|
156 |
| desc: mv a b |
|
|
154 | | desc: mv a b | |
|
157 | 155 | o changeset: 48e1b6ba639d5d7fb313fa7989eebabf99c9eb83 |
|
158 |
| desc: randomcommit |
|
|
156 | | desc: randomcommit | |
|
159 | 157 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 |
|
160 |
desc: initial |
|
|
158 | desc: initial | |
|
161 | 159 | |
|
162 | 160 | $ hg rebase -s . -d 0 |
|
163 | 161 | rebasing 3:fbe97126b396 "mod b" (tip) |
|
164 | 162 | merging a and b to a |
|
165 | 163 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fbe97126b396-cf5452a1-rebase.hg (glob) |
|
166 | 164 | $ cd .. |
|
167 | $ rm -rf server | |
|
168 | 165 | $ rm -rf repo |
|
169 | 166 | |
|
170 | Rebase draft commit on top of draft commit | |
|
167 | Check a few potential move candidates | |
|
168 | ------------------------------------- | |
|
169 | ||
|
171 | 170 | $ hg init repo |
|
172 | 171 | $ initclient repo |
|
173 | 172 | $ cd repo |
|
174 | $ echo 'somecontent' > a | |
|
175 | $ hg add a | |
|
176 | $ hg ci -m initial | |
|
177 | $ hg mv a b | |
|
178 | $ hg ci -m 'mv a b' | |
|
179 | $ hg up -q ".^" | |
|
180 | $ echo b > a | |
|
181 | $ hg ci -qm 'mod a' | |
|
182 | ||
|
183 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' | |
|
184 | @ changeset: 5268f05aa1684cfb5741e9eb05eddcc1c5ee7508 | |
|
185 | | desc: mod a, phase: draft | |
|
186 | | o changeset: 542cb58df733ee48fa74729bd2cdb94c9310d362 | |
|
187 | |/ desc: mv a b, phase: draft | |
|
188 | o changeset: e5b71fb099c29d9172ef4a23485aaffd497e4cc0 | |
|
189 | desc: initial, phase: draft | |
|
190 | ||
|
191 | $ hg rebase -s . -d 1 | |
|
192 | rebasing 2:5268f05aa168 "mod a" (tip) | |
|
193 | merging b and a to b | |
|
194 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/5268f05aa168-284f6515-rebase.hg (glob) | |
|
195 | $ cd .. | |
|
196 | $ rm -rf server | |
|
197 | $ rm -rf repo | |
|
198 | ||
|
199 | Check a few potential move candidates | |
|
200 | $ hg init server | |
|
201 | $ initclient server | |
|
202 | $ cd server | |
|
203 | 173 | $ mkdir dir |
|
204 | 174 | $ echo a > dir/a |
|
205 | 175 | $ hg add dir/a |
@@ -210,43 +180,36 b' Check a few potential move candidates' | |||
|
210 | 180 | $ echo b > dir2/a |
|
211 | 181 | $ hg add dir2/a |
|
212 | 182 | $ hg ci -qm 'create dir2/a' |
|
213 | $ cd .. | |
|
214 | $ hg clone -q server repo | |
|
215 | $ initclient repo | |
|
216 | $ cd repo | |
|
217 | 183 | $ hg up -q 0 |
|
218 | 184 | $ echo b > dir/a |
|
219 | 185 | $ hg ci -qm 'mod dir/a' |
|
220 | 186 | |
|
221 |
$ hg log -G -T 'changeset: {node}\n desc: {desc} |
|
|
187 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
222 | 188 | @ changeset: 6b2f4cece40fd320f41229f23821256ffc08efea |
|
223 |
| desc: mod dir/a |
|
|
189 | | desc: mod dir/a | |
|
224 | 190 | | o changeset: 4494bf7efd2e0dfdd388e767fb913a8a3731e3fa |
|
225 |
| | desc: create dir2/a |
|
|
191 | | | desc: create dir2/a | |
|
226 | 192 | | o changeset: b1784dfab6ea6bfafeb11c0ac50a2981b0fe6ade |
|
227 |
|/ desc: mv dir/a dir/b |
|
|
193 | |/ desc: mv dir/a dir/b | |
|
228 | 194 | o changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944 |
|
229 |
desc: initial |
|
|
195 | desc: initial | |
|
230 | 196 | |
|
231 | 197 | $ hg rebase -s . -d 2 |
|
232 | 198 | rebasing 3:6b2f4cece40f "mod dir/a" (tip) |
|
233 | 199 | merging dir/b and dir/a to dir/b |
|
234 | 200 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/6b2f4cece40f-503efe60-rebase.hg (glob) |
|
235 | 201 | $ cd .. |
|
236 | $ rm -rf server | |
|
237 | 202 | $ rm -rf repo |
|
238 | 203 | |
|
239 | 204 | Move file in one branch and delete it in another |
|
240 | $ hg init server | |
|
241 | $ initclient server | |
|
242 | $ cd server | |
|
205 | ----------------------------------------------- | |
|
206 | ||
|
207 | $ hg init repo | |
|
208 | $ initclient repo | |
|
209 | $ cd repo | |
|
243 | 210 | $ echo a > a |
|
244 | 211 | $ hg add a |
|
245 | 212 | $ hg ci -m initial |
|
246 | $ cd .. | |
|
247 | $ hg clone -q server repo | |
|
248 | $ initclient repo | |
|
249 | $ cd repo | |
|
250 | 213 | $ hg mv a b |
|
251 | 214 | $ hg ci -m 'mv a b' |
|
252 | 215 | $ hg up -q ".^" |
@@ -260,7 +223,7 b' Move file in one branch and delete it in' | |||
|
260 | 223 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
261 | 224 | |/ desc: mv a b, phase: draft |
|
262 | 225 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
263 |
desc: initial, phase: |
|
|
226 | desc: initial, phase: draft | |
|
264 | 227 | |
|
265 | 228 | $ hg rebase -s 1 -d 2 |
|
266 | 229 | rebasing 1:472e38d57782 "mv a b" |
@@ -269,34 +232,31 b' Move file in one branch and delete it in' | |||
|
269 | 232 | $ ls |
|
270 | 233 | b |
|
271 | 234 | $ cd .. |
|
272 | $ rm -rf server | |
|
273 | 235 | $ rm -rf repo |
|
274 | 236 | |
|
275 | 237 | Move a directory in draft branch |
|
276 | $ hg init server | |
|
277 | $ initclient server | |
|
278 | $ cd server | |
|
238 | -------------------------------- | |
|
239 | ||
|
240 | $ hg init repo | |
|
241 | $ initclient repo | |
|
242 | $ cd repo | |
|
279 | 243 | $ mkdir dir |
|
280 | 244 | $ echo a > dir/a |
|
281 | 245 | $ hg add dir/a |
|
282 | 246 | $ hg ci -qm initial |
|
283 | $ cd .. | |
|
284 | $ hg clone -q server repo | |
|
285 | $ initclient repo | |
|
286 | $ cd repo | |
|
287 | 247 | $ echo b > dir/a |
|
288 | 248 | $ hg ci -qm 'mod dir/a' |
|
289 | 249 | $ hg up -q ".^" |
|
290 | 250 | $ hg mv -q dir/ dir2 |
|
291 | 251 | $ hg ci -qm 'mv dir/ dir2/' |
|
292 | 252 | |
|
293 |
$ hg log -G -T 'changeset: {node}\n desc: {desc} |
|
|
253 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
294 | 254 | @ changeset: a33d80b6e352591dfd82784e1ad6cdd86b25a239 |
|
295 |
| desc: mv dir/ dir2/ |
|
|
255 | | desc: mv dir/ dir2/ | |
|
296 | 256 | | o changeset: 6b2f4cece40fd320f41229f23821256ffc08efea |
|
297 |
|/ desc: mod dir/a |
|
|
257 | |/ desc: mod dir/a | |
|
298 | 258 | o changeset: 36859b8907c513a3a87ae34ba5b1e7eea8c20944 |
|
299 |
desc: initial |
|
|
259 | desc: initial | |
|
300 | 260 | |
|
301 | 261 | $ hg rebase -s . -d 1 |
|
302 | 262 | rebasing 2:a33d80b6e352 "mv dir/ dir2/" (tip) |
@@ -307,9 +267,11 b' Move a directory in draft branch' | |||
|
307 | 267 | $ rm -rf repo |
|
308 | 268 | |
|
309 | 269 | Move file twice and rebase mod on top of moves |
|
310 | $ hg init server | |
|
311 | $ initclient server | |
|
312 | $ cd server | |
|
270 | ---------------------------------------------- | |
|
271 | ||
|
272 | $ hg init repo | |
|
273 | $ initclient repo | |
|
274 | $ cd repo | |
|
313 | 275 | $ echo a > a |
|
314 | 276 | $ hg add a |
|
315 | 277 | $ hg ci -m initial |
@@ -317,60 +279,54 b' Move file twice and rebase mod on top of' | |||
|
317 | 279 | $ hg ci -m 'mv a b' |
|
318 | 280 | $ hg mv b c |
|
319 | 281 | $ hg ci -m 'mv b c' |
|
320 | $ cd .. | |
|
321 | $ hg clone -q server repo | |
|
322 | $ initclient repo | |
|
323 | $ cd repo | |
|
324 | $ hg up -q 0 | |
|
325 | $ echo c > a | |
|
326 | $ hg ci -m 'mod a' | |
|
327 | created new head | |
|
328 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' | |
|
329 | @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3 | |
|
330 | | desc: mod a, phase: draft | |
|
331 | | o changeset: d3efd280421d24f9f229997c19e654761c942a71 | |
|
332 | | | desc: mv b c, phase: public | |
|
333 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 | |
|
334 | |/ desc: mv a b, phase: public | |
|
335 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
|
336 | desc: initial, phase: public | |
|
337 | $ hg rebase -s . -d 2 | |
|
338 | rebasing 3:d41316942216 "mod a" (tip) | |
|
339 | merging c and a to c | |
|
340 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg (glob) | |
|
341 | ||
|
342 | $ cd .. | |
|
343 | $ rm -rf server | |
|
344 | $ rm -rf repo | |
|
345 | ||
|
346 | Move file twice and rebase moves on top of mods | |
|
347 | $ hg init server | |
|
348 | $ initclient server | |
|
349 | $ cd server | |
|
350 | $ echo a > a | |
|
351 | $ hg add a | |
|
352 | $ hg ci -m initial | |
|
353 | $ cd .. | |
|
354 | $ hg clone -q server repo | |
|
355 | $ initclient repo | |
|
356 | $ cd repo | |
|
357 | $ hg mv a b | |
|
358 | $ hg ci -m 'mv a b' | |
|
359 | $ hg mv b c | |
|
360 | $ hg ci -m 'mv b c' | |
|
361 | 282 | $ hg up -q 0 |
|
362 | 283 | $ echo c > a |
|
363 | 284 | $ hg ci -m 'mod a' |
|
364 | 285 | created new head |
|
365 | $ hg log -G -T 'changeset: {node}\n desc: {desc}, phase: {phase}\n' | |
|
286 | ||
|
287 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
366 | 288 | @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3 |
|
367 |
| desc: mod a |
|
|
289 | | desc: mod a | |
|
368 | 290 | | o changeset: d3efd280421d24f9f229997c19e654761c942a71 |
|
369 |
| | desc: mv b c |
|
|
291 | | | desc: mv b c | |
|
370 | 292 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
371 |
|/ desc: mv a b |
|
|
293 | |/ desc: mv a b | |
|
372 | 294 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
373 |
desc: initial |
|
|
295 | desc: initial | |
|
296 | $ hg rebase -s . -d 2 | |
|
297 | rebasing 3:d41316942216 "mod a" (tip) | |
|
298 | merging c and a to c | |
|
299 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg (glob) | |
|
300 | ||
|
301 | $ cd .. | |
|
302 | $ rm -rf repo | |
|
303 | ||
|
304 | Move file twice and rebase moves on top of mods | |
|
305 | ----------------------------------------------- | |
|
306 | ||
|
307 | $ hg init repo | |
|
308 | $ initclient repo | |
|
309 | $ cd repo | |
|
310 | $ echo a > a | |
|
311 | $ hg add a | |
|
312 | $ hg ci -m initial | |
|
313 | $ hg mv a b | |
|
314 | $ hg ci -m 'mv a b' | |
|
315 | $ hg mv b c | |
|
316 | $ hg ci -m 'mv b c' | |
|
317 | $ hg up -q 0 | |
|
318 | $ echo c > a | |
|
319 | $ hg ci -m 'mod a' | |
|
320 | created new head | |
|
321 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
322 | @ changeset: d413169422167a3fa5275fc5d71f7dea9f5775f3 | |
|
323 | | desc: mod a | |
|
324 | | o changeset: d3efd280421d24f9f229997c19e654761c942a71 | |
|
325 | | | desc: mv b c | |
|
326 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 | |
|
327 | |/ desc: mv a b | |
|
328 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 | |
|
329 | desc: initial | |
|
374 | 330 | $ hg rebase -s 1 -d . |
|
375 | 331 | rebasing 1:472e38d57782 "mv a b" |
|
376 | 332 | merging a and b to b |
@@ -379,13 +335,14 b' Move file twice and rebase moves on top ' | |||
|
379 | 335 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-ab8d3c58-rebase.hg (glob) |
|
380 | 336 | |
|
381 | 337 | $ cd .. |
|
382 | $ rm -rf server | |
|
383 | 338 | $ rm -rf repo |
|
384 | 339 | |
|
385 | 340 | Move one file and add another file in the same folder in one branch, modify file in another branch |
|
386 | $ hg init server | |
|
387 | $ initclient server | |
|
388 | $ cd server | |
|
341 | -------------------------------------------------------------------------------------------------- | |
|
342 | ||
|
343 | $ hg init repo | |
|
344 | $ initclient repo | |
|
345 | $ cd repo | |
|
389 | 346 | $ echo a > a |
|
390 | 347 | $ hg add a |
|
391 | 348 | $ hg ci -m initial |
@@ -394,24 +351,20 b' Move one file and add another file in th' | |||
|
394 | 351 | $ echo c > c |
|
395 | 352 | $ hg add c |
|
396 | 353 | $ hg ci -m 'add c' |
|
397 | $ cd .. | |
|
398 | $ hg clone -q server repo | |
|
399 | $ initclient repo | |
|
400 | $ cd repo | |
|
401 | 354 | $ hg up -q 0 |
|
402 | 355 | $ echo b > a |
|
403 | 356 | $ hg ci -m 'mod a' |
|
404 | 357 | created new head |
|
405 | 358 | |
|
406 |
$ hg log -G -T 'changeset: {node}\n desc: {desc} |
|
|
359 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
407 | 360 | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e |
|
408 |
| desc: mod a |
|
|
361 | | desc: mod a | |
|
409 | 362 | | o changeset: b1a6187e79fbce851bb584eadcb0cc4a80290fd9 |
|
410 |
| | desc: add c |
|
|
363 | | | desc: add c | |
|
411 | 364 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
412 |
|/ desc: mv a b |
|
|
365 | |/ desc: mv a b | |
|
413 | 366 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
414 |
desc: initial |
|
|
367 | desc: initial | |
|
415 | 368 | |
|
416 | 369 | $ hg rebase -s . -d 2 |
|
417 | 370 | rebasing 3:ef716627c70b "mod a" (tip) |
@@ -422,10 +375,14 b' Move one file and add another file in th' | |||
|
422 | 375 | c |
|
423 | 376 | $ cat b |
|
424 | 377 | b |
|
378 | $ rm -rf repo | |
|
425 | 379 | |
|
426 | 380 | Merge test |
|
427 | $ hg init server | |
|
428 | $ cd server | |
|
381 | ---------- | |
|
382 | ||
|
383 | $ hg init repo | |
|
384 | $ initclient repo | |
|
385 | $ cd repo | |
|
429 | 386 | $ echo a > a |
|
430 | 387 | $ hg add a |
|
431 | 388 | $ hg ci -m initial |
@@ -435,19 +392,15 b' Merge test' | |||
|
435 | 392 | $ hg mv a b |
|
436 | 393 | $ hg ci -m 'mv a b' |
|
437 | 394 | created new head |
|
438 | $ cd .. | |
|
439 | $ hg clone -q server repo | |
|
440 | $ initclient repo | |
|
441 | $ cd repo | |
|
442 | 395 | $ hg up -q 2 |
|
443 | 396 | |
|
444 |
$ hg log -G -T 'changeset: {node}\n desc: {desc} |
|
|
397 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
445 | 398 | @ changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
446 |
| desc: mv a b |
|
|
399 | | desc: mv a b | |
|
447 | 400 | | o changeset: b0357b07f79129a3d08a68621271ca1352ae8a09 |
|
448 |
|/ desc: modify a |
|
|
401 | |/ desc: modify a | |
|
449 | 402 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
450 |
desc: initial |
|
|
403 | desc: initial | |
|
451 | 404 | |
|
452 | 405 | $ hg merge 1 |
|
453 | 406 | merging b and a to b |
@@ -457,35 +410,32 b' Merge test' | |||
|
457 | 410 | $ ls |
|
458 | 411 | b |
|
459 | 412 | $ cd .. |
|
460 | $ rm -rf server | |
|
461 | 413 | $ rm -rf repo |
|
462 | 414 | |
|
463 | 415 | Copy and move file |
|
464 | $ hg init server | |
|
465 | $ initclient server | |
|
466 | $ cd server | |
|
416 | ------------------ | |
|
417 | ||
|
418 | $ hg init repo | |
|
419 | $ initclient repo | |
|
420 | $ cd repo | |
|
467 | 421 | $ echo a > a |
|
468 | 422 | $ hg add a |
|
469 | 423 | $ hg ci -m initial |
|
470 | 424 | $ hg cp a c |
|
471 | 425 | $ hg mv a b |
|
472 | 426 | $ hg ci -m 'cp a c, mv a b' |
|
473 | $ cd .. | |
|
474 | $ hg clone -q server repo | |
|
475 | $ initclient repo | |
|
476 | $ cd repo | |
|
477 | 427 | $ hg up -q 0 |
|
478 | 428 | $ echo b > a |
|
479 | 429 | $ hg ci -m 'mod a' |
|
480 | 430 | created new head |
|
481 | 431 | |
|
482 |
$ hg log -G -T 'changeset: {node}\n desc: {desc} |
|
|
432 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
483 | 433 | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e |
|
484 |
| desc: mod a |
|
|
434 | | desc: mod a | |
|
485 | 435 | | o changeset: 4fc3fd13fbdb89ada6b75bfcef3911a689a0dde8 |
|
486 |
|/ desc: cp a c, mv a b |
|
|
436 | |/ desc: cp a c, mv a b | |
|
487 | 437 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
488 |
desc: initial |
|
|
438 | desc: initial | |
|
489 | 439 | |
|
490 | 440 | $ hg rebase -s . -d 1 |
|
491 | 441 | rebasing 2:ef716627c70b "mod a" (tip) |
@@ -500,37 +450,34 b' Copy and move file' | |||
|
500 | 450 | $ cat c |
|
501 | 451 | b |
|
502 | 452 | $ cd .. |
|
503 | $ rm -rf server | |
|
504 | 453 | $ rm -rf repo |
|
505 | 454 | |
|
506 | 455 | Do a merge commit with many consequent moves in one branch |
|
507 | $ hg init server | |
|
508 | $ initclient server | |
|
509 | $ cd server | |
|
456 | ---------------------------------------------------------- | |
|
457 | ||
|
458 | $ hg init repo | |
|
459 | $ initclient repo | |
|
460 | $ cd repo | |
|
510 | 461 | $ echo a > a |
|
511 | 462 | $ hg add a |
|
512 | 463 | $ hg ci -m initial |
|
513 | 464 | $ echo b > a |
|
514 | 465 | $ hg ci -qm 'mod a' |
|
515 | $ cd .. | |
|
516 | $ hg clone -q server repo | |
|
517 | $ initclient repo | |
|
518 | $ cd repo | |
|
519 | 466 | $ hg up -q ".^" |
|
520 | 467 | $ hg mv a b |
|
521 | 468 | $ hg ci -qm 'mv a b' |
|
522 | 469 | $ hg mv b c |
|
523 | 470 | $ hg ci -qm 'mv b c' |
|
524 | 471 | $ hg up -q 1 |
|
525 |
$ hg log -G -T 'changeset: {node}\n desc: {desc} |
|
|
472 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
526 | 473 | o changeset: d3efd280421d24f9f229997c19e654761c942a71 |
|
527 |
| desc: mv b c |
|
|
474 | | desc: mv b c | |
|
528 | 475 | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
529 |
| desc: mv a b |
|
|
476 | | desc: mv a b | |
|
530 | 477 | | @ changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e |
|
531 |
|/ desc: mod a |
|
|
478 | |/ desc: mod a | |
|
532 | 479 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
533 |
desc: initial |
|
|
480 | desc: initial | |
|
534 | 481 | |
|
535 | 482 | $ hg merge 3 |
|
536 | 483 | merging a and c to c |
@@ -545,26 +492,23 b' Do a merge commit with many consequent m' | |||
|
545 | 492 | | o changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
546 | 493 | | | desc: mv a b, phase: draft |
|
547 | 494 | o | changeset: ef716627c70bf4ca0bdb623cfb0d6fe5b9acc51e |
|
548 |
|/ desc: mod a, phase: |
|
|
495 | |/ desc: mod a, phase: draft | |
|
549 | 496 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
550 |
desc: initial, phase: |
|
|
497 | desc: initial, phase: draft | |
|
551 | 498 | $ ls |
|
552 | 499 | c |
|
553 | 500 | $ cd .. |
|
554 | $ rm -rf server | |
|
555 | 501 | $ rm -rf repo |
|
556 | 502 | |
|
557 | 503 | Test shelve/unshelve |
|
558 | $ hg init server | |
|
559 | $ initclient server | |
|
560 | $ cd server | |
|
504 | ------------------- | |
|
505 | ||
|
506 | $ hg init repo | |
|
507 | $ initclient repo | |
|
508 | $ cd repo | |
|
561 | 509 | $ echo a > a |
|
562 | 510 | $ hg add a |
|
563 | 511 | $ hg ci -m initial |
|
564 | $ cd .. | |
|
565 | $ hg clone -q server repo | |
|
566 | $ initclient repo | |
|
567 | $ cd repo | |
|
568 | 512 | $ echo b > a |
|
569 | 513 | $ hg shelve |
|
570 | 514 | shelved as default |
@@ -572,11 +516,11 b' Test shelve/unshelve' | |||
|
572 | 516 | $ hg mv a b |
|
573 | 517 | $ hg ci -m 'mv a b' |
|
574 | 518 | |
|
575 |
$ hg log -G -T 'changeset: {node}\n desc: {desc} |
|
|
519 | $ hg log -G -T 'changeset: {node}\n desc: {desc}\n' | |
|
576 | 520 | @ changeset: 472e38d57782172f6c6abed82a94ca0d998c3a22 |
|
577 |
| desc: mv a b |
|
|
521 | | desc: mv a b | |
|
578 | 522 | o changeset: 1451231c87572a7d3f92fc210b4b35711c949a98 |
|
579 |
desc: initial |
|
|
523 | desc: initial | |
|
580 | 524 | $ hg unshelve |
|
581 | 525 | unshelving change 'default' |
|
582 | 526 | rebasing shelved changes |
@@ -587,7 +531,6 b' Test shelve/unshelve' | |||
|
587 | 531 | $ cat b |
|
588 | 532 | b |
|
589 | 533 | $ cd .. |
|
590 | $ rm -rf server | |
|
591 | 534 | $ rm -rf repo |
|
592 | 535 | |
|
593 | 536 | Test full copytrace ability on draft branch |
@@ -619,7 +562,7 b' File directory and base name changed in ' | |||
|
619 | 562 | o changeset 81973cd24b58db2fdf18ce3d64fb2cc3284e9ab3 |
|
620 | 563 | desc initial, phase: draft |
|
621 | 564 | |
|
622 | $ hg rebase -s . -d 1 | |
|
565 | $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100 | |
|
623 | 566 | rebasing 2:6207d2d318e7 "mod a" (tip) |
|
624 | 567 | merging dir2/b and dir1/a to dir2/b |
|
625 | 568 | saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/6207d2d318e7-1c9779ad-rebase.hg (glob) |
@@ -627,11 +570,11 b' File directory and base name changed in ' | |||
|
627 | 570 | a |
|
628 | 571 | b |
|
629 | 572 | $ cd .. |
|
630 | $ rm -rf server | |
|
631 | 573 | $ rm -rf repo |
|
632 | 574 | |
|
633 | 575 | Move directory in one merge parent, while adding file to original directory |
|
634 | 576 | in other merge parent. File moved on rebase. |
|
577 | ||
|
635 | 578 | $ hg init repo |
|
636 | 579 | $ initclient repo |
|
637 | 580 | $ mkdir repo/dir1 |
@@ -657,16 +600,16 b' in other merge parent. File moved on reb' | |||
|
657 | 600 | o changeset a235dcce55dcf42034c4e374cb200662d0bb4a13 |
|
658 | 601 | desc initial, phase: draft |
|
659 | 602 | |
|
660 | $ hg rebase -s . -d 1 | |
|
603 | $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100 | |
|
661 | 604 | rebasing 2:e8919e7df8d0 "mv dir1 dir2" (tip) |
|
662 | 605 | saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/e8919e7df8d0-f62fab62-rebase.hg (glob) |
|
663 | 606 | $ ls dir2 |
|
664 | 607 | a |
|
665 | 608 | dummy |
|
666 | $ rm -rf server | |
|
667 | 609 | $ rm -rf repo |
|
668 | 610 | |
|
669 | 611 | Testing the sourcecommitlimit config |
|
612 | ----------------------------------- | |
|
670 | 613 | |
|
671 | 614 | $ hg init repo |
|
672 | 615 | $ initclient repo |
@@ -694,7 +637,7 b' Testing the sourcecommitlimit config' | |||
|
694 | 637 | |
|
695 | 638 | When the sourcecommitlimit is small and we have more drafts, we use heuristics only |
|
696 | 639 | |
|
697 | $ hg rebase -s 8b6e13696 -d . --config experimental.copytrace.sourcecommitlimit=0 | |
|
640 | $ hg rebase -s 8b6e13696 -d . | |
|
698 | 641 | rebasing 1:8b6e13696c38 "added more things to a" |
|
699 | 642 | other [source] changed a which local [dest] deleted |
|
700 | 643 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
@@ -706,7 +649,7 b' fullcopytracing' | |||
|
706 | 649 | |
|
707 | 650 | $ hg rebase --abort |
|
708 | 651 | rebase aborted |
|
709 | $ hg rebase -s 8b6e13696 -d . | |
|
652 | $ hg rebase -s 8b6e13696 -d . --config experimental.copytrace.sourcecommitlimit=100 | |
|
710 | 653 | rebasing 1:8b6e13696c38 "added more things to a" |
|
711 | 654 | merging foo/bar and a to foo/bar |
|
712 | 655 | saved backup bundle to $TESTTMP/repo/repo/repo/.hg/strip-backup/8b6e13696c38-fc14ac83-rebase.hg (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now