Show More
@@ -1,1348 +1,1573 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ add() |
|
3 | 3 | > { |
|
4 | 4 | > echo $2 >> $1 |
|
5 | 5 | > } |
|
6 | 6 | $ hg init t |
|
7 | 7 | $ cd t |
|
8 | 8 | |
|
9 | 9 | set up a boring main branch |
|
10 | 10 | |
|
11 | 11 | $ add a a |
|
12 | 12 | $ hg add a |
|
13 | 13 | $ mkdir x |
|
14 | 14 | $ add x/x x |
|
15 | 15 | $ hg add x/x |
|
16 | 16 | $ hg ci -m0 |
|
17 | 17 | $ add a m1 |
|
18 | 18 | $ hg ci -m1 |
|
19 | 19 | $ add a m2 |
|
20 | 20 | $ add x/y y1 |
|
21 | 21 | $ hg add x/y |
|
22 | 22 | $ hg ci -m2 |
|
23 | 23 | $ cd .. |
|
24 | ||
|
24 | 25 | $ show() |
|
25 | 26 | > { |
|
26 |
> echo " |
|
|
27 | > echo "# $2:" | |
|
28 | > echo | |
|
29 | > echo "% hg st -C $1" | |
|
27 | 30 | > hg st -C $1 |
|
28 | 31 | > echo |
|
32 | > echo "% hg diff --git $1" | |
|
29 | 33 | > hg diff --git $1 |
|
30 | 34 | > echo |
|
31 | 35 | > } |
|
32 | 36 | $ count=0 |
|
33 | 37 | |
|
34 | 38 | make a new branch and get diff/status output |
|
35 | 39 | $1 - first commit |
|
36 | 40 | $2 - second commit |
|
37 | 41 | $3 - working dir action |
|
38 | $4 - test description | |
|
39 | 42 | |
|
40 | 43 | $ tb() |
|
41 | 44 | > { |
|
42 | > hg clone t t2 ; cd t2 | |
|
45 | > hg clone -q t t2 ; cd t2 | |
|
43 | 46 | > hg co -q -C 0 |
|
44 | 47 | > |
|
48 | > echo % add a $count | |
|
45 | 49 | > add a $count |
|
46 | 50 | > count=`expr $count + 1` |
|
51 | > echo % hg ci -m "t0" | |
|
47 | 52 | > hg ci -m "t0" |
|
53 | > echo % $1 | |
|
48 | 54 | > $1 |
|
55 | > echo % hg ci -m "t1" | |
|
49 | 56 |
|
|
57 | > echo % $2 | |
|
50 | 58 | > $2 |
|
59 | > echo % hg ci -m "t2" | |
|
51 | 60 |
|
|
61 | > echo % $3 | |
|
52 | 62 | > $3 |
|
53 | > | |
|
54 | > echo "** $4 **" | |
|
55 | > echo "** $1 / $2 / $3" | |
|
63 | > echo | |
|
56 | 64 | > show "" "working to parent" |
|
57 | 65 | > show "--rev 0" "working to root" |
|
58 | 66 | > show "--rev 2" "working to branch" |
|
59 | 67 | > show "--rev 0 --rev ." "root to parent" |
|
60 | 68 | > show "--rev . --rev 0" "parent to root" |
|
61 | 69 | > show "--rev 2 --rev ." "branch to parent" |
|
62 | 70 | > show "--rev . --rev 2" "parent to branch" |
|
63 | 71 | > echo |
|
64 | 72 | > cd .. |
|
65 | 73 | > rm -rf t2 |
|
66 | 74 | > } |
|
67 | $ tb "add a a1" "add a a2" "hg mv a b" "rename in working dir" | |
|
68 | updating to branch default | |
|
69 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
75 | ||
|
76 | rename in working dir | |
|
77 | ||
|
78 | $ tb "add a a1" "add a a2" "hg mv a b" | |
|
79 | % add a 0 | |
|
80 | % hg ci -m t0 | |
|
70 | 81 | created new head |
|
71 | ** rename in working dir ** | |
|
72 | ** add a a1 / add a a2 / hg mv a b | |
|
73 | - working to parent: | |
|
82 | % add a a1 | |
|
83 | % hg ci -m t1 | |
|
84 | % add a a2 | |
|
85 | % hg ci -m t2 | |
|
86 | % hg mv a b | |
|
87 | ||
|
88 | # working to parent: | |
|
89 | ||
|
90 | % hg st -C | |
|
74 | 91 | A b |
|
75 | 92 | a |
|
76 | 93 | R a |
|
77 | 94 | |
|
95 | % hg diff --git | |
|
78 | 96 | diff --git a/a b/b |
|
79 | 97 | rename from a |
|
80 | 98 | rename to b |
|
81 | 99 | |
|
82 |
|
|
|
100 | # working to root: | |
|
101 | ||
|
102 | % hg st -C --rev 0 | |
|
83 | 103 | A b |
|
84 | 104 | a |
|
85 | 105 | R a |
|
86 | 106 | |
|
107 | % hg diff --git --rev 0 | |
|
87 | 108 | diff --git a/a b/b |
|
88 | 109 | rename from a |
|
89 | 110 | rename to b |
|
90 | 111 | --- a/a |
|
91 | 112 | +++ b/b |
|
92 | 113 | @@ -1,1 +1,4 @@ |
|
93 | 114 | a |
|
94 | 115 | +0 |
|
95 | 116 | +a1 |
|
96 | 117 | +a2 |
|
97 | 118 | |
|
98 |
|
|
|
119 | # working to branch: | |
|
120 | ||
|
121 | % hg st -C --rev 2 | |
|
99 | 122 | A b |
|
100 | 123 | a |
|
101 | 124 | R a |
|
102 | 125 | R x/y |
|
103 | 126 | |
|
127 | % hg diff --git --rev 2 | |
|
104 | 128 | diff --git a/a b/b |
|
105 | 129 | rename from a |
|
106 | 130 | rename to b |
|
107 | 131 | --- a/a |
|
108 | 132 | +++ b/b |
|
109 | 133 | @@ -1,3 +1,4 @@ |
|
110 | 134 | a |
|
111 | 135 | -m1 |
|
112 | 136 | -m2 |
|
113 | 137 | +0 |
|
114 | 138 | +a1 |
|
115 | 139 | +a2 |
|
116 | 140 | diff --git a/x/y b/x/y |
|
117 | 141 | deleted file mode 100644 |
|
118 | 142 | --- a/x/y |
|
119 | 143 | +++ /dev/null |
|
120 | 144 | @@ -1,1 +0,0 @@ |
|
121 | 145 | -y1 |
|
122 | 146 | |
|
123 |
|
|
|
147 | # root to parent: | |
|
148 | ||
|
149 | % hg st -C --rev 0 --rev . | |
|
124 | 150 | M a |
|
125 | 151 | |
|
152 | % hg diff --git --rev 0 --rev . | |
|
126 | 153 | diff --git a/a b/a |
|
127 | 154 | --- a/a |
|
128 | 155 | +++ b/a |
|
129 | 156 | @@ -1,1 +1,4 @@ |
|
130 | 157 | a |
|
131 | 158 | +0 |
|
132 | 159 | +a1 |
|
133 | 160 | +a2 |
|
134 | 161 | |
|
135 |
|
|
|
162 | # parent to root: | |
|
163 | ||
|
164 | % hg st -C --rev . --rev 0 | |
|
136 | 165 | M a |
|
137 | 166 | |
|
167 | % hg diff --git --rev . --rev 0 | |
|
138 | 168 | diff --git a/a b/a |
|
139 | 169 | --- a/a |
|
140 | 170 | +++ b/a |
|
141 | 171 | @@ -1,4 +1,1 @@ |
|
142 | 172 | a |
|
143 | 173 | -0 |
|
144 | 174 | -a1 |
|
145 | 175 | -a2 |
|
146 | 176 | |
|
147 |
|
|
|
177 | # branch to parent: | |
|
178 | ||
|
179 | % hg st -C --rev 2 --rev . | |
|
148 | 180 | M a |
|
149 | 181 | R x/y |
|
150 | 182 | |
|
183 | % hg diff --git --rev 2 --rev . | |
|
151 | 184 | diff --git a/a b/a |
|
152 | 185 | --- a/a |
|
153 | 186 | +++ b/a |
|
154 | 187 | @@ -1,3 +1,4 @@ |
|
155 | 188 | a |
|
156 | 189 | -m1 |
|
157 | 190 | -m2 |
|
158 | 191 | +0 |
|
159 | 192 | +a1 |
|
160 | 193 | +a2 |
|
161 | 194 | diff --git a/x/y b/x/y |
|
162 | 195 | deleted file mode 100644 |
|
163 | 196 | --- a/x/y |
|
164 | 197 | +++ /dev/null |
|
165 | 198 | @@ -1,1 +0,0 @@ |
|
166 | 199 | -y1 |
|
167 | 200 | |
|
168 |
|
|
|
201 | # parent to branch: | |
|
202 | ||
|
203 | % hg st -C --rev . --rev 2 | |
|
169 | 204 | M a |
|
170 | 205 | A x/y |
|
171 | 206 | |
|
207 | % hg diff --git --rev . --rev 2 | |
|
172 | 208 | diff --git a/a b/a |
|
173 | 209 | --- a/a |
|
174 | 210 | +++ b/a |
|
175 | 211 | @@ -1,4 +1,3 @@ |
|
176 | 212 | a |
|
177 | 213 | -0 |
|
178 | 214 | -a1 |
|
179 | 215 | -a2 |
|
180 | 216 | +m1 |
|
181 | 217 | +m2 |
|
182 | 218 | diff --git a/x/y b/x/y |
|
183 | 219 | new file mode 100644 |
|
184 | 220 | --- /dev/null |
|
185 | 221 | +++ b/x/y |
|
186 | 222 | @@ -0,0 +1,1 @@ |
|
187 | 223 | +y1 |
|
188 | 224 | |
|
189 | 225 | |
|
190 | $ tb "add a a1" "add a a2" "hg cp a b" "copy in working dir" | |
|
191 | updating to branch default | |
|
192 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
226 | copy in working dir | |
|
227 | ||
|
228 | $ tb "add a a1" "add a a2" "hg cp a b" | |
|
229 | % add a 1 | |
|
230 | % hg ci -m t0 | |
|
193 | 231 | created new head |
|
194 | ** copy in working dir ** | |
|
195 | ** add a a1 / add a a2 / hg cp a b | |
|
196 | - working to parent: | |
|
232 | % add a a1 | |
|
233 | % hg ci -m t1 | |
|
234 | % add a a2 | |
|
235 | % hg ci -m t2 | |
|
236 | % hg cp a b | |
|
237 | ||
|
238 | # working to parent: | |
|
239 | ||
|
240 | % hg st -C | |
|
197 | 241 | A b |
|
198 | 242 | a |
|
199 | 243 | |
|
244 | % hg diff --git | |
|
200 | 245 | diff --git a/a b/b |
|
201 | 246 | copy from a |
|
202 | 247 | copy to b |
|
203 | 248 | |
|
204 |
|
|
|
249 | # working to root: | |
|
250 | ||
|
251 | % hg st -C --rev 0 | |
|
205 | 252 | M a |
|
206 | 253 | A b |
|
207 | 254 | a |
|
208 | 255 | |
|
256 | % hg diff --git --rev 0 | |
|
209 | 257 | diff --git a/a b/a |
|
210 | 258 | --- a/a |
|
211 | 259 | +++ b/a |
|
212 | 260 | @@ -1,1 +1,4 @@ |
|
213 | 261 | a |
|
214 | 262 | +1 |
|
215 | 263 | +a1 |
|
216 | 264 | +a2 |
|
217 | 265 | diff --git a/a b/b |
|
218 | 266 | copy from a |
|
219 | 267 | copy to b |
|
220 | 268 | --- a/a |
|
221 | 269 | +++ b/b |
|
222 | 270 | @@ -1,1 +1,4 @@ |
|
223 | 271 | a |
|
224 | 272 | +1 |
|
225 | 273 | +a1 |
|
226 | 274 | +a2 |
|
227 | 275 | |
|
228 |
|
|
|
276 | # working to branch: | |
|
277 | ||
|
278 | % hg st -C --rev 2 | |
|
229 | 279 | M a |
|
230 | 280 | A b |
|
231 | 281 | a |
|
232 | 282 | R x/y |
|
233 | 283 | |
|
284 | % hg diff --git --rev 2 | |
|
234 | 285 | diff --git a/a b/a |
|
235 | 286 | --- a/a |
|
236 | 287 | +++ b/a |
|
237 | 288 | @@ -1,3 +1,4 @@ |
|
238 | 289 | a |
|
239 | 290 | -m1 |
|
240 | 291 | -m2 |
|
241 | 292 | +1 |
|
242 | 293 | +a1 |
|
243 | 294 | +a2 |
|
244 | 295 | diff --git a/a b/b |
|
245 | 296 | copy from a |
|
246 | 297 | copy to b |
|
247 | 298 | --- a/a |
|
248 | 299 | +++ b/b |
|
249 | 300 | @@ -1,3 +1,4 @@ |
|
250 | 301 | a |
|
251 | 302 | -m1 |
|
252 | 303 | -m2 |
|
253 | 304 | +1 |
|
254 | 305 | +a1 |
|
255 | 306 | +a2 |
|
256 | 307 | diff --git a/x/y b/x/y |
|
257 | 308 | deleted file mode 100644 |
|
258 | 309 | --- a/x/y |
|
259 | 310 | +++ /dev/null |
|
260 | 311 | @@ -1,1 +0,0 @@ |
|
261 | 312 | -y1 |
|
262 | 313 | |
|
263 |
|
|
|
314 | # root to parent: | |
|
315 | ||
|
316 | % hg st -C --rev 0 --rev . | |
|
264 | 317 | M a |
|
265 | 318 | |
|
319 | % hg diff --git --rev 0 --rev . | |
|
266 | 320 | diff --git a/a b/a |
|
267 | 321 | --- a/a |
|
268 | 322 | +++ b/a |
|
269 | 323 | @@ -1,1 +1,4 @@ |
|
270 | 324 | a |
|
271 | 325 | +1 |
|
272 | 326 | +a1 |
|
273 | 327 | +a2 |
|
274 | 328 | |
|
275 |
|
|
|
329 | # parent to root: | |
|
330 | ||
|
331 | % hg st -C --rev . --rev 0 | |
|
276 | 332 | M a |
|
277 | 333 | |
|
334 | % hg diff --git --rev . --rev 0 | |
|
278 | 335 | diff --git a/a b/a |
|
279 | 336 | --- a/a |
|
280 | 337 | +++ b/a |
|
281 | 338 | @@ -1,4 +1,1 @@ |
|
282 | 339 | a |
|
283 | 340 | -1 |
|
284 | 341 | -a1 |
|
285 | 342 | -a2 |
|
286 | 343 | |
|
287 |
|
|
|
344 | # branch to parent: | |
|
345 | ||
|
346 | % hg st -C --rev 2 --rev . | |
|
288 | 347 | M a |
|
289 | 348 | R x/y |
|
290 | 349 | |
|
350 | % hg diff --git --rev 2 --rev . | |
|
291 | 351 | diff --git a/a b/a |
|
292 | 352 | --- a/a |
|
293 | 353 | +++ b/a |
|
294 | 354 | @@ -1,3 +1,4 @@ |
|
295 | 355 | a |
|
296 | 356 | -m1 |
|
297 | 357 | -m2 |
|
298 | 358 | +1 |
|
299 | 359 | +a1 |
|
300 | 360 | +a2 |
|
301 | 361 | diff --git a/x/y b/x/y |
|
302 | 362 | deleted file mode 100644 |
|
303 | 363 | --- a/x/y |
|
304 | 364 | +++ /dev/null |
|
305 | 365 | @@ -1,1 +0,0 @@ |
|
306 | 366 | -y1 |
|
307 | 367 | |
|
308 |
|
|
|
368 | # parent to branch: | |
|
369 | ||
|
370 | % hg st -C --rev . --rev 2 | |
|
309 | 371 | M a |
|
310 | 372 | A x/y |
|
311 | 373 | |
|
374 | % hg diff --git --rev . --rev 2 | |
|
312 | 375 | diff --git a/a b/a |
|
313 | 376 | --- a/a |
|
314 | 377 | +++ b/a |
|
315 | 378 | @@ -1,4 +1,3 @@ |
|
316 | 379 | a |
|
317 | 380 | -1 |
|
318 | 381 | -a1 |
|
319 | 382 | -a2 |
|
320 | 383 | +m1 |
|
321 | 384 | +m2 |
|
322 | 385 | diff --git a/x/y b/x/y |
|
323 | 386 | new file mode 100644 |
|
324 | 387 | --- /dev/null |
|
325 | 388 | +++ b/x/y |
|
326 | 389 | @@ -0,0 +1,1 @@ |
|
327 | 390 | +y1 |
|
328 | 391 | |
|
329 | 392 | |
|
330 | $ tb "hg mv a b" "add b b1" "add b w" "single rename" | |
|
331 | updating to branch default | |
|
332 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
393 | single rename | |
|
394 | ||
|
395 | $ tb "hg mv a b" "add b b1" "add b w" | |
|
396 | % add a 2 | |
|
397 | % hg ci -m t0 | |
|
333 | 398 | created new head |
|
334 | ** single rename ** | |
|
335 | ** hg mv a b / add b b1 / add b w | |
|
336 | - working to parent: | |
|
399 | % hg mv a b | |
|
400 | % hg ci -m t1 | |
|
401 | % add b b1 | |
|
402 | % hg ci -m t2 | |
|
403 | % add b w | |
|
404 | ||
|
405 | # working to parent: | |
|
406 | ||
|
407 | % hg st -C | |
|
337 | 408 | M b |
|
338 | 409 | |
|
410 | % hg diff --git | |
|
339 | 411 | diff --git a/b b/b |
|
340 | 412 | --- a/b |
|
341 | 413 | +++ b/b |
|
342 | 414 | @@ -1,3 +1,4 @@ |
|
343 | 415 | a |
|
344 | 416 | 2 |
|
345 | 417 | b1 |
|
346 | 418 | +w |
|
347 | 419 | |
|
348 |
|
|
|
420 | # working to root: | |
|
421 | ||
|
422 | % hg st -C --rev 0 | |
|
349 | 423 | A b |
|
350 | 424 | a |
|
351 | 425 | R a |
|
352 | 426 | |
|
427 | % hg diff --git --rev 0 | |
|
353 | 428 | diff --git a/a b/b |
|
354 | 429 | rename from a |
|
355 | 430 | rename to b |
|
356 | 431 | --- a/a |
|
357 | 432 | +++ b/b |
|
358 | 433 | @@ -1,1 +1,4 @@ |
|
359 | 434 | a |
|
360 | 435 | +2 |
|
361 | 436 | +b1 |
|
362 | 437 | +w |
|
363 | 438 | |
|
364 |
|
|
|
439 | # working to branch: | |
|
440 | ||
|
441 | % hg st -C --rev 2 | |
|
365 | 442 | A b |
|
366 | 443 | a |
|
367 | 444 | R a |
|
368 | 445 | R x/y |
|
369 | 446 | |
|
447 | % hg diff --git --rev 2 | |
|
370 | 448 | diff --git a/a b/b |
|
371 | 449 | rename from a |
|
372 | 450 | rename to b |
|
373 | 451 | --- a/a |
|
374 | 452 | +++ b/b |
|
375 | 453 | @@ -1,3 +1,4 @@ |
|
376 | 454 | a |
|
377 | 455 | -m1 |
|
378 | 456 | -m2 |
|
379 | 457 | +2 |
|
380 | 458 | +b1 |
|
381 | 459 | +w |
|
382 | 460 | diff --git a/x/y b/x/y |
|
383 | 461 | deleted file mode 100644 |
|
384 | 462 | --- a/x/y |
|
385 | 463 | +++ /dev/null |
|
386 | 464 | @@ -1,1 +0,0 @@ |
|
387 | 465 | -y1 |
|
388 | 466 | |
|
389 |
|
|
|
467 | # root to parent: | |
|
468 | ||
|
469 | % hg st -C --rev 0 --rev . | |
|
390 | 470 | A b |
|
391 | 471 | a |
|
392 | 472 | R a |
|
393 | 473 | |
|
474 | % hg diff --git --rev 0 --rev . | |
|
394 | 475 | diff --git a/a b/b |
|
395 | 476 | rename from a |
|
396 | 477 | rename to b |
|
397 | 478 | --- a/a |
|
398 | 479 | +++ b/b |
|
399 | 480 | @@ -1,1 +1,3 @@ |
|
400 | 481 | a |
|
401 | 482 | +2 |
|
402 | 483 | +b1 |
|
403 | 484 | |
|
404 |
|
|
|
485 | # parent to root: | |
|
486 | ||
|
487 | % hg st -C --rev . --rev 0 | |
|
405 | 488 | A a |
|
406 | 489 | b |
|
407 | 490 | R b |
|
408 | 491 | |
|
492 | % hg diff --git --rev . --rev 0 | |
|
409 | 493 | diff --git a/b b/a |
|
410 | 494 | rename from b |
|
411 | 495 | rename to a |
|
412 | 496 | --- a/b |
|
413 | 497 | +++ b/a |
|
414 | 498 | @@ -1,3 +1,1 @@ |
|
415 | 499 | a |
|
416 | 500 | -2 |
|
417 | 501 | -b1 |
|
418 | 502 | |
|
419 |
|
|
|
503 | # branch to parent: | |
|
504 | ||
|
505 | % hg st -C --rev 2 --rev . | |
|
420 | 506 | A b |
|
421 | 507 | a |
|
422 | 508 | R a |
|
423 | 509 | R x/y |
|
424 | 510 | |
|
511 | % hg diff --git --rev 2 --rev . | |
|
425 | 512 | diff --git a/a b/b |
|
426 | 513 | rename from a |
|
427 | 514 | rename to b |
|
428 | 515 | --- a/a |
|
429 | 516 | +++ b/b |
|
430 | 517 | @@ -1,3 +1,3 @@ |
|
431 | 518 | a |
|
432 | 519 | -m1 |
|
433 | 520 | -m2 |
|
434 | 521 | +2 |
|
435 | 522 | +b1 |
|
436 | 523 | diff --git a/x/y b/x/y |
|
437 | 524 | deleted file mode 100644 |
|
438 | 525 | --- a/x/y |
|
439 | 526 | +++ /dev/null |
|
440 | 527 | @@ -1,1 +0,0 @@ |
|
441 | 528 | -y1 |
|
442 | 529 | |
|
443 |
|
|
|
530 | # parent to branch: | |
|
531 | ||
|
532 | % hg st -C --rev . --rev 2 | |
|
444 | 533 | A a |
|
445 | 534 | b |
|
446 | 535 | A x/y |
|
447 | 536 | R b |
|
448 | 537 | |
|
538 | % hg diff --git --rev . --rev 2 | |
|
449 | 539 | diff --git a/b b/a |
|
450 | 540 | rename from b |
|
451 | 541 | rename to a |
|
452 | 542 | --- a/b |
|
453 | 543 | +++ b/a |
|
454 | 544 | @@ -1,3 +1,3 @@ |
|
455 | 545 | a |
|
456 | 546 | -2 |
|
457 | 547 | -b1 |
|
458 | 548 | +m1 |
|
459 | 549 | +m2 |
|
460 | 550 | diff --git a/x/y b/x/y |
|
461 | 551 | new file mode 100644 |
|
462 | 552 | --- /dev/null |
|
463 | 553 | +++ b/x/y |
|
464 | 554 | @@ -0,0 +1,1 @@ |
|
465 | 555 | +y1 |
|
466 | 556 | |
|
467 | 557 | |
|
468 | $ tb "hg cp a b" "add b b1" "add a w" "single copy" | |
|
469 | updating to branch default | |
|
470 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
558 | single copy | |
|
559 | ||
|
560 | $ tb "hg cp a b" "add b b1" "add a w" | |
|
561 | % add a 3 | |
|
562 | % hg ci -m t0 | |
|
471 | 563 | created new head |
|
472 | ** single copy ** | |
|
473 | ** hg cp a b / add b b1 / add a w | |
|
474 | - working to parent: | |
|
564 | % hg cp a b | |
|
565 | % hg ci -m t1 | |
|
566 | % add b b1 | |
|
567 | % hg ci -m t2 | |
|
568 | % add a w | |
|
569 | ||
|
570 | # working to parent: | |
|
571 | ||
|
572 | % hg st -C | |
|
475 | 573 | M a |
|
476 | 574 | |
|
575 | % hg diff --git | |
|
477 | 576 | diff --git a/a b/a |
|
478 | 577 | --- a/a |
|
479 | 578 | +++ b/a |
|
480 | 579 | @@ -1,2 +1,3 @@ |
|
481 | 580 | a |
|
482 | 581 | 3 |
|
483 | 582 | +w |
|
484 | 583 | |
|
485 |
|
|
|
584 | # working to root: | |
|
585 | ||
|
586 | % hg st -C --rev 0 | |
|
486 | 587 | M a |
|
487 | 588 | A b |
|
488 | 589 | a |
|
489 | 590 | |
|
591 | % hg diff --git --rev 0 | |
|
490 | 592 | diff --git a/a b/a |
|
491 | 593 | --- a/a |
|
492 | 594 | +++ b/a |
|
493 | 595 | @@ -1,1 +1,3 @@ |
|
494 | 596 | a |
|
495 | 597 | +3 |
|
496 | 598 | +w |
|
497 | 599 | diff --git a/a b/b |
|
498 | 600 | copy from a |
|
499 | 601 | copy to b |
|
500 | 602 | --- a/a |
|
501 | 603 | +++ b/b |
|
502 | 604 | @@ -1,1 +1,3 @@ |
|
503 | 605 | a |
|
504 | 606 | +3 |
|
505 | 607 | +b1 |
|
506 | 608 | |
|
507 |
|
|
|
609 | # working to branch: | |
|
610 | ||
|
611 | % hg st -C --rev 2 | |
|
508 | 612 | M a |
|
509 | 613 | A b |
|
510 | 614 | a |
|
511 | 615 | R x/y |
|
512 | 616 | |
|
617 | % hg diff --git --rev 2 | |
|
513 | 618 | diff --git a/a b/a |
|
514 | 619 | --- a/a |
|
515 | 620 | +++ b/a |
|
516 | 621 | @@ -1,3 +1,3 @@ |
|
517 | 622 | a |
|
518 | 623 | -m1 |
|
519 | 624 | -m2 |
|
520 | 625 | +3 |
|
521 | 626 | +w |
|
522 | 627 | diff --git a/a b/b |
|
523 | 628 | copy from a |
|
524 | 629 | copy to b |
|
525 | 630 | --- a/a |
|
526 | 631 | +++ b/b |
|
527 | 632 | @@ -1,3 +1,3 @@ |
|
528 | 633 | a |
|
529 | 634 | -m1 |
|
530 | 635 | -m2 |
|
531 | 636 | +3 |
|
532 | 637 | +b1 |
|
533 | 638 | diff --git a/x/y b/x/y |
|
534 | 639 | deleted file mode 100644 |
|
535 | 640 | --- a/x/y |
|
536 | 641 | +++ /dev/null |
|
537 | 642 | @@ -1,1 +0,0 @@ |
|
538 | 643 | -y1 |
|
539 | 644 | |
|
540 |
|
|
|
645 | # root to parent: | |
|
646 | ||
|
647 | % hg st -C --rev 0 --rev . | |
|
541 | 648 | M a |
|
542 | 649 | A b |
|
543 | 650 | a |
|
544 | 651 | |
|
652 | % hg diff --git --rev 0 --rev . | |
|
545 | 653 | diff --git a/a b/a |
|
546 | 654 | --- a/a |
|
547 | 655 | +++ b/a |
|
548 | 656 | @@ -1,1 +1,2 @@ |
|
549 | 657 | a |
|
550 | 658 | +3 |
|
551 | 659 | diff --git a/a b/b |
|
552 | 660 | copy from a |
|
553 | 661 | copy to b |
|
554 | 662 | --- a/a |
|
555 | 663 | +++ b/b |
|
556 | 664 | @@ -1,1 +1,3 @@ |
|
557 | 665 | a |
|
558 | 666 | +3 |
|
559 | 667 | +b1 |
|
560 | 668 | |
|
561 |
|
|
|
669 | # parent to root: | |
|
670 | ||
|
671 | % hg st -C --rev . --rev 0 | |
|
562 | 672 | M a |
|
563 | 673 | b |
|
564 | 674 | R b |
|
565 | 675 | |
|
676 | % hg diff --git --rev . --rev 0 | |
|
566 | 677 | diff --git a/a b/a |
|
567 | 678 | --- a/a |
|
568 | 679 | +++ b/a |
|
569 | 680 | @@ -1,2 +1,1 @@ |
|
570 | 681 | a |
|
571 | 682 | -3 |
|
572 | 683 | diff --git a/b b/b |
|
573 | 684 | deleted file mode 100644 |
|
574 | 685 | --- a/b |
|
575 | 686 | +++ /dev/null |
|
576 | 687 | @@ -1,3 +0,0 @@ |
|
577 | 688 | -a |
|
578 | 689 | -3 |
|
579 | 690 | -b1 |
|
580 | 691 | |
|
581 |
|
|
|
692 | # branch to parent: | |
|
693 | ||
|
694 | % hg st -C --rev 2 --rev . | |
|
582 | 695 | M a |
|
583 | 696 | A b |
|
584 | 697 | a |
|
585 | 698 | R x/y |
|
586 | 699 | |
|
700 | % hg diff --git --rev 2 --rev . | |
|
587 | 701 | diff --git a/a b/a |
|
588 | 702 | --- a/a |
|
589 | 703 | +++ b/a |
|
590 | 704 | @@ -1,3 +1,2 @@ |
|
591 | 705 | a |
|
592 | 706 | -m1 |
|
593 | 707 | -m2 |
|
594 | 708 | +3 |
|
595 | 709 | diff --git a/a b/b |
|
596 | 710 | copy from a |
|
597 | 711 | copy to b |
|
598 | 712 | --- a/a |
|
599 | 713 | +++ b/b |
|
600 | 714 | @@ -1,3 +1,3 @@ |
|
601 | 715 | a |
|
602 | 716 | -m1 |
|
603 | 717 | -m2 |
|
604 | 718 | +3 |
|
605 | 719 | +b1 |
|
606 | 720 | diff --git a/x/y b/x/y |
|
607 | 721 | deleted file mode 100644 |
|
608 | 722 | --- a/x/y |
|
609 | 723 | +++ /dev/null |
|
610 | 724 | @@ -1,1 +0,0 @@ |
|
611 | 725 | -y1 |
|
612 | 726 | |
|
613 |
|
|
|
727 | # parent to branch: | |
|
728 | ||
|
729 | % hg st -C --rev . --rev 2 | |
|
614 | 730 | M a |
|
615 | 731 | b |
|
616 | 732 | A x/y |
|
617 | 733 | R b |
|
618 | 734 | |
|
735 | % hg diff --git --rev . --rev 2 | |
|
619 | 736 | diff --git a/a b/a |
|
620 | 737 | --- a/a |
|
621 | 738 | +++ b/a |
|
622 | 739 | @@ -1,2 +1,3 @@ |
|
623 | 740 | a |
|
624 | 741 | -3 |
|
625 | 742 | +m1 |
|
626 | 743 | +m2 |
|
627 | 744 | diff --git a/b b/b |
|
628 | 745 | deleted file mode 100644 |
|
629 | 746 | --- a/b |
|
630 | 747 | +++ /dev/null |
|
631 | 748 | @@ -1,3 +0,0 @@ |
|
632 | 749 | -a |
|
633 | 750 | -3 |
|
634 | 751 | -b1 |
|
635 | 752 | diff --git a/x/y b/x/y |
|
636 | 753 | new file mode 100644 |
|
637 | 754 | --- /dev/null |
|
638 | 755 | +++ b/x/y |
|
639 | 756 | @@ -0,0 +1,1 @@ |
|
640 | 757 | +y1 |
|
641 | 758 | |
|
642 | 759 | |
|
643 | $ tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain" | |
|
644 | updating to branch default | |
|
645 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
760 | rename chain | |
|
761 | ||
|
762 | $ tb "hg mv a b" "hg mv b c" "hg mv c d" | |
|
763 | % add a 4 | |
|
764 | % hg ci -m t0 | |
|
646 | 765 | created new head |
|
647 | ** rename chain ** | |
|
648 | ** hg mv a b / hg mv b c / hg mv c d | |
|
649 | - working to parent: | |
|
766 | % hg mv a b | |
|
767 | % hg ci -m t1 | |
|
768 | % hg mv b c | |
|
769 | % hg ci -m t2 | |
|
770 | % hg mv c d | |
|
771 | ||
|
772 | # working to parent: | |
|
773 | ||
|
774 | % hg st -C | |
|
650 | 775 | A d |
|
651 | 776 | c |
|
652 | 777 | R c |
|
653 | 778 | |
|
779 | % hg diff --git | |
|
654 | 780 | diff --git a/c b/d |
|
655 | 781 | rename from c |
|
656 | 782 | rename to d |
|
657 | 783 | |
|
658 |
|
|
|
784 | # working to root: | |
|
785 | ||
|
786 | % hg st -C --rev 0 | |
|
659 | 787 | A d |
|
660 | 788 | a |
|
661 | 789 | R a |
|
662 | 790 | |
|
791 | % hg diff --git --rev 0 | |
|
663 | 792 | diff --git a/a b/d |
|
664 | 793 | rename from a |
|
665 | 794 | rename to d |
|
666 | 795 | --- a/a |
|
667 | 796 | +++ b/d |
|
668 | 797 | @@ -1,1 +1,2 @@ |
|
669 | 798 | a |
|
670 | 799 | +4 |
|
671 | 800 | |
|
672 |
|
|
|
801 | # working to branch: | |
|
802 | ||
|
803 | % hg st -C --rev 2 | |
|
673 | 804 | A d |
|
674 | 805 | a |
|
675 | 806 | R a |
|
676 | 807 | R x/y |
|
677 | 808 | |
|
809 | % hg diff --git --rev 2 | |
|
678 | 810 | diff --git a/a b/d |
|
679 | 811 | rename from a |
|
680 | 812 | rename to d |
|
681 | 813 | --- a/a |
|
682 | 814 | +++ b/d |
|
683 | 815 | @@ -1,3 +1,2 @@ |
|
684 | 816 | a |
|
685 | 817 | -m1 |
|
686 | 818 | -m2 |
|
687 | 819 | +4 |
|
688 | 820 | diff --git a/x/y b/x/y |
|
689 | 821 | deleted file mode 100644 |
|
690 | 822 | --- a/x/y |
|
691 | 823 | +++ /dev/null |
|
692 | 824 | @@ -1,1 +0,0 @@ |
|
693 | 825 | -y1 |
|
694 | 826 | |
|
695 |
|
|
|
827 | # root to parent: | |
|
828 | ||
|
829 | % hg st -C --rev 0 --rev . | |
|
696 | 830 | A c |
|
697 | 831 | a |
|
698 | 832 | R a |
|
699 | 833 | |
|
834 | % hg diff --git --rev 0 --rev . | |
|
700 | 835 | diff --git a/a b/c |
|
701 | 836 | rename from a |
|
702 | 837 | rename to c |
|
703 | 838 | --- a/a |
|
704 | 839 | +++ b/c |
|
705 | 840 | @@ -1,1 +1,2 @@ |
|
706 | 841 | a |
|
707 | 842 | +4 |
|
708 | 843 | |
|
709 |
|
|
|
844 | # parent to root: | |
|
845 | ||
|
846 | % hg st -C --rev . --rev 0 | |
|
710 | 847 | A a |
|
711 | 848 | c |
|
712 | 849 | R c |
|
713 | 850 | |
|
851 | % hg diff --git --rev . --rev 0 | |
|
714 | 852 | diff --git a/c b/a |
|
715 | 853 | rename from c |
|
716 | 854 | rename to a |
|
717 | 855 | --- a/c |
|
718 | 856 | +++ b/a |
|
719 | 857 | @@ -1,2 +1,1 @@ |
|
720 | 858 | a |
|
721 | 859 | -4 |
|
722 | 860 | |
|
723 |
|
|
|
861 | # branch to parent: | |
|
862 | ||
|
863 | % hg st -C --rev 2 --rev . | |
|
724 | 864 | A c |
|
725 | 865 | a |
|
726 | 866 | R a |
|
727 | 867 | R x/y |
|
728 | 868 | |
|
869 | % hg diff --git --rev 2 --rev . | |
|
729 | 870 | diff --git a/a b/c |
|
730 | 871 | rename from a |
|
731 | 872 | rename to c |
|
732 | 873 | --- a/a |
|
733 | 874 | +++ b/c |
|
734 | 875 | @@ -1,3 +1,2 @@ |
|
735 | 876 | a |
|
736 | 877 | -m1 |
|
737 | 878 | -m2 |
|
738 | 879 | +4 |
|
739 | 880 | diff --git a/x/y b/x/y |
|
740 | 881 | deleted file mode 100644 |
|
741 | 882 | --- a/x/y |
|
742 | 883 | +++ /dev/null |
|
743 | 884 | @@ -1,1 +0,0 @@ |
|
744 | 885 | -y1 |
|
745 | 886 | |
|
746 |
|
|
|
887 | # parent to branch: | |
|
888 | ||
|
889 | % hg st -C --rev . --rev 2 | |
|
747 | 890 | A a |
|
748 | 891 | c |
|
749 | 892 | A x/y |
|
750 | 893 | R c |
|
751 | 894 | |
|
895 | % hg diff --git --rev . --rev 2 | |
|
752 | 896 | diff --git a/c b/a |
|
753 | 897 | rename from c |
|
754 | 898 | rename to a |
|
755 | 899 | --- a/c |
|
756 | 900 | +++ b/a |
|
757 | 901 | @@ -1,2 +1,3 @@ |
|
758 | 902 | a |
|
759 | 903 | -4 |
|
760 | 904 | +m1 |
|
761 | 905 | +m2 |
|
762 | 906 | diff --git a/x/y b/x/y |
|
763 | 907 | new file mode 100644 |
|
764 | 908 | --- /dev/null |
|
765 | 909 | +++ b/x/y |
|
766 | 910 | @@ -0,0 +1,1 @@ |
|
767 | 911 | +y1 |
|
768 | 912 | |
|
769 | 913 | |
|
770 | $ tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain" | |
|
771 | updating to branch default | |
|
772 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
914 | copy chain | |
|
915 | ||
|
916 | $ tb "hg cp a b" "hg cp b c" "hg cp c d" | |
|
917 | % add a 5 | |
|
918 | % hg ci -m t0 | |
|
773 | 919 | created new head |
|
774 | ** copy chain ** | |
|
775 | ** hg cp a b / hg cp b c / hg cp c d | |
|
776 | - working to parent: | |
|
920 | % hg cp a b | |
|
921 | % hg ci -m t1 | |
|
922 | % hg cp b c | |
|
923 | % hg ci -m t2 | |
|
924 | % hg cp c d | |
|
925 | ||
|
926 | # working to parent: | |
|
927 | ||
|
928 | % hg st -C | |
|
777 | 929 | A d |
|
778 | 930 | c |
|
779 | 931 | |
|
932 | % hg diff --git | |
|
780 | 933 | diff --git a/c b/d |
|
781 | 934 | copy from c |
|
782 | 935 | copy to d |
|
783 | 936 | |
|
784 |
|
|
|
937 | # working to root: | |
|
938 | ||
|
939 | % hg st -C --rev 0 | |
|
785 | 940 | M a |
|
786 | 941 | A b |
|
787 | 942 | a |
|
788 | 943 | A c |
|
789 | 944 | a |
|
790 | 945 | A d |
|
791 | 946 | a |
|
792 | 947 | |
|
948 | % hg diff --git --rev 0 | |
|
793 | 949 | diff --git a/a b/a |
|
794 | 950 | --- a/a |
|
795 | 951 | +++ b/a |
|
796 | 952 | @@ -1,1 +1,2 @@ |
|
797 | 953 | a |
|
798 | 954 | +5 |
|
799 | 955 | diff --git a/a b/b |
|
800 | 956 | copy from a |
|
801 | 957 | copy to b |
|
802 | 958 | --- a/a |
|
803 | 959 | +++ b/b |
|
804 | 960 | @@ -1,1 +1,2 @@ |
|
805 | 961 | a |
|
806 | 962 | +5 |
|
807 | 963 | diff --git a/a b/c |
|
808 | 964 | copy from a |
|
809 | 965 | copy to c |
|
810 | 966 | --- a/a |
|
811 | 967 | +++ b/c |
|
812 | 968 | @@ -1,1 +1,2 @@ |
|
813 | 969 | a |
|
814 | 970 | +5 |
|
815 | 971 | diff --git a/a b/d |
|
816 | 972 | copy from a |
|
817 | 973 | copy to d |
|
818 | 974 | --- a/a |
|
819 | 975 | +++ b/d |
|
820 | 976 | @@ -1,1 +1,2 @@ |
|
821 | 977 | a |
|
822 | 978 | +5 |
|
823 | 979 | |
|
824 |
|
|
|
980 | # working to branch: | |
|
981 | ||
|
982 | % hg st -C --rev 2 | |
|
825 | 983 | M a |
|
826 | 984 | A b |
|
827 | 985 | a |
|
828 | 986 | A c |
|
829 | 987 | a |
|
830 | 988 | A d |
|
831 | 989 | a |
|
832 | 990 | R x/y |
|
833 | 991 | |
|
992 | % hg diff --git --rev 2 | |
|
834 | 993 | diff --git a/a b/a |
|
835 | 994 | --- a/a |
|
836 | 995 | +++ b/a |
|
837 | 996 | @@ -1,3 +1,2 @@ |
|
838 | 997 | a |
|
839 | 998 | -m1 |
|
840 | 999 | -m2 |
|
841 | 1000 | +5 |
|
842 | 1001 | diff --git a/a b/b |
|
843 | 1002 | copy from a |
|
844 | 1003 | copy to b |
|
845 | 1004 | --- a/a |
|
846 | 1005 | +++ b/b |
|
847 | 1006 | @@ -1,3 +1,2 @@ |
|
848 | 1007 | a |
|
849 | 1008 | -m1 |
|
850 | 1009 | -m2 |
|
851 | 1010 | +5 |
|
852 | 1011 | diff --git a/a b/c |
|
853 | 1012 | copy from a |
|
854 | 1013 | copy to c |
|
855 | 1014 | --- a/a |
|
856 | 1015 | +++ b/c |
|
857 | 1016 | @@ -1,3 +1,2 @@ |
|
858 | 1017 | a |
|
859 | 1018 | -m1 |
|
860 | 1019 | -m2 |
|
861 | 1020 | +5 |
|
862 | 1021 | diff --git a/a b/d |
|
863 | 1022 | copy from a |
|
864 | 1023 | copy to d |
|
865 | 1024 | --- a/a |
|
866 | 1025 | +++ b/d |
|
867 | 1026 | @@ -1,3 +1,2 @@ |
|
868 | 1027 | a |
|
869 | 1028 | -m1 |
|
870 | 1029 | -m2 |
|
871 | 1030 | +5 |
|
872 | 1031 | diff --git a/x/y b/x/y |
|
873 | 1032 | deleted file mode 100644 |
|
874 | 1033 | --- a/x/y |
|
875 | 1034 | +++ /dev/null |
|
876 | 1035 | @@ -1,1 +0,0 @@ |
|
877 | 1036 | -y1 |
|
878 | 1037 | |
|
879 |
|
|
|
1038 | # root to parent: | |
|
1039 | ||
|
1040 | % hg st -C --rev 0 --rev . | |
|
880 | 1041 | M a |
|
881 | 1042 | A b |
|
882 | 1043 | a |
|
883 | 1044 | A c |
|
884 | 1045 | a |
|
885 | 1046 | |
|
1047 | % hg diff --git --rev 0 --rev . | |
|
886 | 1048 | diff --git a/a b/a |
|
887 | 1049 | --- a/a |
|
888 | 1050 | +++ b/a |
|
889 | 1051 | @@ -1,1 +1,2 @@ |
|
890 | 1052 | a |
|
891 | 1053 | +5 |
|
892 | 1054 | diff --git a/a b/b |
|
893 | 1055 | copy from a |
|
894 | 1056 | copy to b |
|
895 | 1057 | --- a/a |
|
896 | 1058 | +++ b/b |
|
897 | 1059 | @@ -1,1 +1,2 @@ |
|
898 | 1060 | a |
|
899 | 1061 | +5 |
|
900 | 1062 | diff --git a/a b/c |
|
901 | 1063 | copy from a |
|
902 | 1064 | copy to c |
|
903 | 1065 | --- a/a |
|
904 | 1066 | +++ b/c |
|
905 | 1067 | @@ -1,1 +1,2 @@ |
|
906 | 1068 | a |
|
907 | 1069 | +5 |
|
908 | 1070 | |
|
909 |
|
|
|
1071 | # parent to root: | |
|
1072 | ||
|
1073 | % hg st -C --rev . --rev 0 | |
|
910 | 1074 | M a |
|
911 | 1075 | b |
|
912 | 1076 | R b |
|
913 | 1077 | R c |
|
914 | 1078 | |
|
1079 | % hg diff --git --rev . --rev 0 | |
|
915 | 1080 | diff --git a/a b/a |
|
916 | 1081 | --- a/a |
|
917 | 1082 | +++ b/a |
|
918 | 1083 | @@ -1,2 +1,1 @@ |
|
919 | 1084 | a |
|
920 | 1085 | -5 |
|
921 | 1086 | diff --git a/b b/b |
|
922 | 1087 | deleted file mode 100644 |
|
923 | 1088 | --- a/b |
|
924 | 1089 | +++ /dev/null |
|
925 | 1090 | @@ -1,2 +0,0 @@ |
|
926 | 1091 | -a |
|
927 | 1092 | -5 |
|
928 | 1093 | diff --git a/c b/c |
|
929 | 1094 | deleted file mode 100644 |
|
930 | 1095 | --- a/c |
|
931 | 1096 | +++ /dev/null |
|
932 | 1097 | @@ -1,2 +0,0 @@ |
|
933 | 1098 | -a |
|
934 | 1099 | -5 |
|
935 | 1100 | |
|
936 |
|
|
|
1101 | # branch to parent: | |
|
1102 | ||
|
1103 | % hg st -C --rev 2 --rev . | |
|
937 | 1104 | M a |
|
938 | 1105 | A b |
|
939 | 1106 | a |
|
940 | 1107 | A c |
|
941 | 1108 | a |
|
942 | 1109 | R x/y |
|
943 | 1110 | |
|
1111 | % hg diff --git --rev 2 --rev . | |
|
944 | 1112 | diff --git a/a b/a |
|
945 | 1113 | --- a/a |
|
946 | 1114 | +++ b/a |
|
947 | 1115 | @@ -1,3 +1,2 @@ |
|
948 | 1116 | a |
|
949 | 1117 | -m1 |
|
950 | 1118 | -m2 |
|
951 | 1119 | +5 |
|
952 | 1120 | diff --git a/a b/b |
|
953 | 1121 | copy from a |
|
954 | 1122 | copy to b |
|
955 | 1123 | --- a/a |
|
956 | 1124 | +++ b/b |
|
957 | 1125 | @@ -1,3 +1,2 @@ |
|
958 | 1126 | a |
|
959 | 1127 | -m1 |
|
960 | 1128 | -m2 |
|
961 | 1129 | +5 |
|
962 | 1130 | diff --git a/a b/c |
|
963 | 1131 | copy from a |
|
964 | 1132 | copy to c |
|
965 | 1133 | --- a/a |
|
966 | 1134 | +++ b/c |
|
967 | 1135 | @@ -1,3 +1,2 @@ |
|
968 | 1136 | a |
|
969 | 1137 | -m1 |
|
970 | 1138 | -m2 |
|
971 | 1139 | +5 |
|
972 | 1140 | diff --git a/x/y b/x/y |
|
973 | 1141 | deleted file mode 100644 |
|
974 | 1142 | --- a/x/y |
|
975 | 1143 | +++ /dev/null |
|
976 | 1144 | @@ -1,1 +0,0 @@ |
|
977 | 1145 | -y1 |
|
978 | 1146 | |
|
979 |
|
|
|
1147 | # parent to branch: | |
|
1148 | ||
|
1149 | % hg st -C --rev . --rev 2 | |
|
980 | 1150 | M a |
|
981 | 1151 | b |
|
982 | 1152 | A x/y |
|
983 | 1153 | R b |
|
984 | 1154 | R c |
|
985 | 1155 | |
|
1156 | % hg diff --git --rev . --rev 2 | |
|
986 | 1157 | diff --git a/a b/a |
|
987 | 1158 | --- a/a |
|
988 | 1159 | +++ b/a |
|
989 | 1160 | @@ -1,2 +1,3 @@ |
|
990 | 1161 | a |
|
991 | 1162 | -5 |
|
992 | 1163 | +m1 |
|
993 | 1164 | +m2 |
|
994 | 1165 | diff --git a/b b/b |
|
995 | 1166 | deleted file mode 100644 |
|
996 | 1167 | --- a/b |
|
997 | 1168 | +++ /dev/null |
|
998 | 1169 | @@ -1,2 +0,0 @@ |
|
999 | 1170 | -a |
|
1000 | 1171 | -5 |
|
1001 | 1172 | diff --git a/c b/c |
|
1002 | 1173 | deleted file mode 100644 |
|
1003 | 1174 | --- a/c |
|
1004 | 1175 | +++ /dev/null |
|
1005 | 1176 | @@ -1,2 +0,0 @@ |
|
1006 | 1177 | -a |
|
1007 | 1178 | -5 |
|
1008 | 1179 | diff --git a/x/y b/x/y |
|
1009 | 1180 | new file mode 100644 |
|
1010 | 1181 | --- /dev/null |
|
1011 | 1182 | +++ b/x/y |
|
1012 | 1183 | @@ -0,0 +1,1 @@ |
|
1013 | 1184 | +y1 |
|
1014 | 1185 | |
|
1015 | 1186 | |
|
1016 | $ tb "add a a1" "hg mv a b" "hg mv b a" "circular rename" | |
|
1017 | updating to branch default | |
|
1018 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
1187 | circular rename | |
|
1188 | ||
|
1189 | $ tb "add a a1" "hg mv a b" "hg mv b a" | |
|
1190 | % add a 6 | |
|
1191 | % hg ci -m t0 | |
|
1019 | 1192 | created new head |
|
1020 | ** circular rename ** | |
|
1021 | ** add a a1 / hg mv a b / hg mv b a | |
|
1022 | - working to parent: | |
|
1193 | % add a a1 | |
|
1194 | % hg ci -m t1 | |
|
1195 | % hg mv a b | |
|
1196 | % hg ci -m t2 | |
|
1197 | % hg mv b a | |
|
1198 | ||
|
1199 | # working to parent: | |
|
1200 | ||
|
1201 | % hg st -C | |
|
1023 | 1202 | A a |
|
1024 | 1203 | b |
|
1025 | 1204 | R b |
|
1026 | 1205 | |
|
1206 | % hg diff --git | |
|
1027 | 1207 | diff --git a/b b/a |
|
1028 | 1208 | rename from b |
|
1029 | 1209 | rename to a |
|
1030 | 1210 | |
|
1031 |
|
|
|
1211 | # working to root: | |
|
1212 | ||
|
1213 | % hg st -C --rev 0 | |
|
1032 | 1214 | M a |
|
1033 | 1215 | |
|
1216 | % hg diff --git --rev 0 | |
|
1034 | 1217 | diff --git a/a b/a |
|
1035 | 1218 | --- a/a |
|
1036 | 1219 | +++ b/a |
|
1037 | 1220 | @@ -1,1 +1,3 @@ |
|
1038 | 1221 | a |
|
1039 | 1222 | +6 |
|
1040 | 1223 | +a1 |
|
1041 | 1224 | |
|
1042 |
|
|
|
1225 | # working to branch: | |
|
1226 | ||
|
1227 | % hg st -C --rev 2 | |
|
1043 | 1228 | M a |
|
1044 | 1229 | R x/y |
|
1045 | 1230 | |
|
1231 | % hg diff --git --rev 2 | |
|
1046 | 1232 | diff --git a/a b/a |
|
1047 | 1233 | --- a/a |
|
1048 | 1234 | +++ b/a |
|
1049 | 1235 | @@ -1,3 +1,3 @@ |
|
1050 | 1236 | a |
|
1051 | 1237 | -m1 |
|
1052 | 1238 | -m2 |
|
1053 | 1239 | +6 |
|
1054 | 1240 | +a1 |
|
1055 | 1241 | diff --git a/x/y b/x/y |
|
1056 | 1242 | deleted file mode 100644 |
|
1057 | 1243 | --- a/x/y |
|
1058 | 1244 | +++ /dev/null |
|
1059 | 1245 | @@ -1,1 +0,0 @@ |
|
1060 | 1246 | -y1 |
|
1061 | 1247 | |
|
1062 |
|
|
|
1248 | # root to parent: | |
|
1249 | ||
|
1250 | % hg st -C --rev 0 --rev . | |
|
1063 | 1251 | A b |
|
1064 | 1252 | a |
|
1065 | 1253 | R a |
|
1066 | 1254 | |
|
1255 | % hg diff --git --rev 0 --rev . | |
|
1067 | 1256 | diff --git a/a b/b |
|
1068 | 1257 | rename from a |
|
1069 | 1258 | rename to b |
|
1070 | 1259 | --- a/a |
|
1071 | 1260 | +++ b/b |
|
1072 | 1261 | @@ -1,1 +1,3 @@ |
|
1073 | 1262 | a |
|
1074 | 1263 | +6 |
|
1075 | 1264 | +a1 |
|
1076 | 1265 | |
|
1077 |
|
|
|
1266 | # parent to root: | |
|
1267 | ||
|
1268 | % hg st -C --rev . --rev 0 | |
|
1078 | 1269 | A a |
|
1079 | 1270 | b |
|
1080 | 1271 | R b |
|
1081 | 1272 | |
|
1273 | % hg diff --git --rev . --rev 0 | |
|
1082 | 1274 | diff --git a/b b/a |
|
1083 | 1275 | rename from b |
|
1084 | 1276 | rename to a |
|
1085 | 1277 | --- a/b |
|
1086 | 1278 | +++ b/a |
|
1087 | 1279 | @@ -1,3 +1,1 @@ |
|
1088 | 1280 | a |
|
1089 | 1281 | -6 |
|
1090 | 1282 | -a1 |
|
1091 | 1283 | |
|
1092 |
|
|
|
1284 | # branch to parent: | |
|
1285 | ||
|
1286 | % hg st -C --rev 2 --rev . | |
|
1093 | 1287 | A b |
|
1094 | 1288 | a |
|
1095 | 1289 | R a |
|
1096 | 1290 | R x/y |
|
1097 | 1291 | |
|
1292 | % hg diff --git --rev 2 --rev . | |
|
1098 | 1293 | diff --git a/a b/b |
|
1099 | 1294 | rename from a |
|
1100 | 1295 | rename to b |
|
1101 | 1296 | --- a/a |
|
1102 | 1297 | +++ b/b |
|
1103 | 1298 | @@ -1,3 +1,3 @@ |
|
1104 | 1299 | a |
|
1105 | 1300 | -m1 |
|
1106 | 1301 | -m2 |
|
1107 | 1302 | +6 |
|
1108 | 1303 | +a1 |
|
1109 | 1304 | diff --git a/x/y b/x/y |
|
1110 | 1305 | deleted file mode 100644 |
|
1111 | 1306 | --- a/x/y |
|
1112 | 1307 | +++ /dev/null |
|
1113 | 1308 | @@ -1,1 +0,0 @@ |
|
1114 | 1309 | -y1 |
|
1115 | 1310 | |
|
1116 |
|
|
|
1311 | # parent to branch: | |
|
1312 | ||
|
1313 | % hg st -C --rev . --rev 2 | |
|
1117 | 1314 | A a |
|
1118 | 1315 | b |
|
1119 | 1316 | A x/y |
|
1120 | 1317 | R b |
|
1121 | 1318 | |
|
1319 | % hg diff --git --rev . --rev 2 | |
|
1122 | 1320 | diff --git a/b b/a |
|
1123 | 1321 | rename from b |
|
1124 | 1322 | rename to a |
|
1125 | 1323 | --- a/b |
|
1126 | 1324 | +++ b/a |
|
1127 | 1325 | @@ -1,3 +1,3 @@ |
|
1128 | 1326 | a |
|
1129 | 1327 | -6 |
|
1130 | 1328 | -a1 |
|
1131 | 1329 | +m1 |
|
1132 | 1330 | +m2 |
|
1133 | 1331 | diff --git a/x/y b/x/y |
|
1134 | 1332 | new file mode 100644 |
|
1135 | 1333 | --- /dev/null |
|
1136 | 1334 | +++ b/x/y |
|
1137 | 1335 | @@ -0,0 +1,1 @@ |
|
1138 | 1336 | +y1 |
|
1139 | 1337 | |
|
1140 | 1338 | |
|
1141 | $ tb "hg mv x y" "add y/x x1" "add y/x x2" "directory move" | |
|
1142 | updating to branch default | |
|
1143 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
1339 | directory move | |
|
1340 | ||
|
1341 | $ tb "hg mv x y" "add y/x x1" "add y/x x2" | |
|
1342 | % add a 7 | |
|
1343 | % hg ci -m t0 | |
|
1144 | 1344 | created new head |
|
1145 | moving x/x to y/x (glob) | |
|
1146 | ** directory move ** | |
|
1147 | ** hg mv x y / add y/x x1 / add y/x x2 | |
|
1148 | - working to parent: | |
|
1345 | % hg mv x y | |
|
1346 | moving x/x to y/x | |
|
1347 | % hg ci -m t1 | |
|
1348 | % add y/x x1 | |
|
1349 | % hg ci -m t2 | |
|
1350 | % add y/x x2 | |
|
1351 | ||
|
1352 | # working to parent: | |
|
1353 | ||
|
1354 | % hg st -C | |
|
1149 | 1355 | M y/x |
|
1150 | 1356 | |
|
1357 | % hg diff --git | |
|
1151 | 1358 | diff --git a/y/x b/y/x |
|
1152 | 1359 | --- a/y/x |
|
1153 | 1360 | +++ b/y/x |
|
1154 | 1361 | @@ -1,2 +1,3 @@ |
|
1155 | 1362 | x |
|
1156 | 1363 | x1 |
|
1157 | 1364 | +x2 |
|
1158 | 1365 | |
|
1159 |
|
|
|
1366 | # working to root: | |
|
1367 | ||
|
1368 | % hg st -C --rev 0 | |
|
1160 | 1369 | M a |
|
1161 | 1370 | A y/x |
|
1162 | 1371 | x/x |
|
1163 | 1372 | R x/x |
|
1164 | 1373 | |
|
1374 | % hg diff --git --rev 0 | |
|
1165 | 1375 | diff --git a/a b/a |
|
1166 | 1376 | --- a/a |
|
1167 | 1377 | +++ b/a |
|
1168 | 1378 | @@ -1,1 +1,2 @@ |
|
1169 | 1379 | a |
|
1170 | 1380 | +7 |
|
1171 | 1381 | diff --git a/x/x b/y/x |
|
1172 | 1382 | rename from x/x |
|
1173 | 1383 | rename to y/x |
|
1174 | 1384 | --- a/x/x |
|
1175 | 1385 | +++ b/y/x |
|
1176 | 1386 | @@ -1,1 +1,3 @@ |
|
1177 | 1387 | x |
|
1178 | 1388 | +x1 |
|
1179 | 1389 | +x2 |
|
1180 | 1390 | |
|
1181 |
|
|
|
1391 | # working to branch: | |
|
1392 | ||
|
1393 | % hg st -C --rev 2 | |
|
1182 | 1394 | M a |
|
1183 | 1395 | A y/x |
|
1184 | 1396 | x/x |
|
1185 | 1397 | R x/x |
|
1186 | 1398 | R x/y |
|
1187 | 1399 | |
|
1400 | % hg diff --git --rev 2 | |
|
1188 | 1401 | diff --git a/a b/a |
|
1189 | 1402 | --- a/a |
|
1190 | 1403 | +++ b/a |
|
1191 | 1404 | @@ -1,3 +1,2 @@ |
|
1192 | 1405 | a |
|
1193 | 1406 | -m1 |
|
1194 | 1407 | -m2 |
|
1195 | 1408 | +7 |
|
1196 | 1409 | diff --git a/x/y b/x/y |
|
1197 | 1410 | deleted file mode 100644 |
|
1198 | 1411 | --- a/x/y |
|
1199 | 1412 | +++ /dev/null |
|
1200 | 1413 | @@ -1,1 +0,0 @@ |
|
1201 | 1414 | -y1 |
|
1202 | 1415 | diff --git a/x/x b/y/x |
|
1203 | 1416 | rename from x/x |
|
1204 | 1417 | rename to y/x |
|
1205 | 1418 | --- a/x/x |
|
1206 | 1419 | +++ b/y/x |
|
1207 | 1420 | @@ -1,1 +1,3 @@ |
|
1208 | 1421 | x |
|
1209 | 1422 | +x1 |
|
1210 | 1423 | +x2 |
|
1211 | 1424 | |
|
1212 |
|
|
|
1425 | # root to parent: | |
|
1426 | ||
|
1427 | % hg st -C --rev 0 --rev . | |
|
1213 | 1428 | M a |
|
1214 | 1429 | A y/x |
|
1215 | 1430 | x/x |
|
1216 | 1431 | R x/x |
|
1217 | 1432 | |
|
1433 | % hg diff --git --rev 0 --rev . | |
|
1218 | 1434 | diff --git a/a b/a |
|
1219 | 1435 | --- a/a |
|
1220 | 1436 | +++ b/a |
|
1221 | 1437 | @@ -1,1 +1,2 @@ |
|
1222 | 1438 | a |
|
1223 | 1439 | +7 |
|
1224 | 1440 | diff --git a/x/x b/y/x |
|
1225 | 1441 | rename from x/x |
|
1226 | 1442 | rename to y/x |
|
1227 | 1443 | --- a/x/x |
|
1228 | 1444 | +++ b/y/x |
|
1229 | 1445 | @@ -1,1 +1,2 @@ |
|
1230 | 1446 | x |
|
1231 | 1447 | +x1 |
|
1232 | 1448 | |
|
1233 |
|
|
|
1449 | # parent to root: | |
|
1450 | ||
|
1451 | % hg st -C --rev . --rev 0 | |
|
1234 | 1452 | M a |
|
1235 | 1453 | A x/x |
|
1236 | 1454 | y/x |
|
1237 | 1455 | R y/x |
|
1238 | 1456 | |
|
1457 | % hg diff --git --rev . --rev 0 | |
|
1239 | 1458 | diff --git a/a b/a |
|
1240 | 1459 | --- a/a |
|
1241 | 1460 | +++ b/a |
|
1242 | 1461 | @@ -1,2 +1,1 @@ |
|
1243 | 1462 | a |
|
1244 | 1463 | -7 |
|
1245 | 1464 | diff --git a/y/x b/x/x |
|
1246 | 1465 | rename from y/x |
|
1247 | 1466 | rename to x/x |
|
1248 | 1467 | --- a/y/x |
|
1249 | 1468 | +++ b/x/x |
|
1250 | 1469 | @@ -1,2 +1,1 @@ |
|
1251 | 1470 | x |
|
1252 | 1471 | -x1 |
|
1253 | 1472 | |
|
1254 |
|
|
|
1473 | # branch to parent: | |
|
1474 | ||
|
1475 | % hg st -C --rev 2 --rev . | |
|
1255 | 1476 | M a |
|
1256 | 1477 | A y/x |
|
1257 | 1478 | x/x |
|
1258 | 1479 | R x/x |
|
1259 | 1480 | R x/y |
|
1260 | 1481 | |
|
1482 | % hg diff --git --rev 2 --rev . | |
|
1261 | 1483 | diff --git a/a b/a |
|
1262 | 1484 | --- a/a |
|
1263 | 1485 | +++ b/a |
|
1264 | 1486 | @@ -1,3 +1,2 @@ |
|
1265 | 1487 | a |
|
1266 | 1488 | -m1 |
|
1267 | 1489 | -m2 |
|
1268 | 1490 | +7 |
|
1269 | 1491 | diff --git a/x/y b/x/y |
|
1270 | 1492 | deleted file mode 100644 |
|
1271 | 1493 | --- a/x/y |
|
1272 | 1494 | +++ /dev/null |
|
1273 | 1495 | @@ -1,1 +0,0 @@ |
|
1274 | 1496 | -y1 |
|
1275 | 1497 | diff --git a/x/x b/y/x |
|
1276 | 1498 | rename from x/x |
|
1277 | 1499 | rename to y/x |
|
1278 | 1500 | --- a/x/x |
|
1279 | 1501 | +++ b/y/x |
|
1280 | 1502 | @@ -1,1 +1,2 @@ |
|
1281 | 1503 | x |
|
1282 | 1504 | +x1 |
|
1283 | 1505 | |
|
1284 |
|
|
|
1506 | # parent to branch: | |
|
1507 | ||
|
1508 | % hg st -C --rev . --rev 2 | |
|
1285 | 1509 | M a |
|
1286 | 1510 | A x/x |
|
1287 | 1511 | y/x |
|
1288 | 1512 | A x/y |
|
1289 | 1513 | R y/x |
|
1290 | 1514 | |
|
1515 | % hg diff --git --rev . --rev 2 | |
|
1291 | 1516 | diff --git a/a b/a |
|
1292 | 1517 | --- a/a |
|
1293 | 1518 | +++ b/a |
|
1294 | 1519 | @@ -1,2 +1,3 @@ |
|
1295 | 1520 | a |
|
1296 | 1521 | -7 |
|
1297 | 1522 | +m1 |
|
1298 | 1523 | +m2 |
|
1299 | 1524 | diff --git a/y/x b/x/x |
|
1300 | 1525 | rename from y/x |
|
1301 | 1526 | rename to x/x |
|
1302 | 1527 | --- a/y/x |
|
1303 | 1528 | +++ b/x/x |
|
1304 | 1529 | @@ -1,2 +1,1 @@ |
|
1305 | 1530 | x |
|
1306 | 1531 | -x1 |
|
1307 | 1532 | diff --git a/x/y b/x/y |
|
1308 | 1533 | new file mode 100644 |
|
1309 | 1534 | --- /dev/null |
|
1310 | 1535 | +++ b/x/y |
|
1311 | 1536 | @@ -0,0 +1,1 @@ |
|
1312 | 1537 | +y1 |
|
1313 | 1538 | |
|
1314 | 1539 | |
|
1315 | 1540 | |
|
1316 | 1541 | Cannot implement unrelated branch with tb |
|
1317 | 1542 | testing copies with unrelated branch |
|
1318 | 1543 | |
|
1319 | 1544 | $ hg init unrelated |
|
1320 | 1545 | $ cd unrelated |
|
1321 |
$ |
|
|
1546 | $ echo a >> a | |
|
1322 | 1547 | $ hg ci -Am adda |
|
1323 | 1548 | adding a |
|
1324 | 1549 | $ hg mv a b |
|
1325 | 1550 | $ hg ci -m movea |
|
1326 | 1551 | $ hg up -C null |
|
1327 | 1552 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1328 |
$ |
|
|
1553 | $ echo a >> a | |
|
1329 | 1554 | $ hg ci -Am addunrelateda |
|
1330 | 1555 | adding a |
|
1331 | 1556 | created new head |
|
1332 | 1557 | |
|
1333 | 1558 | unrelated branch diff |
|
1334 | 1559 | |
|
1335 | 1560 | $ hg diff --git -r 2 -r 1 |
|
1336 | 1561 | diff --git a/a b/a |
|
1337 | 1562 | deleted file mode 100644 |
|
1338 | 1563 | --- a/a |
|
1339 | 1564 | +++ /dev/null |
|
1340 | 1565 | @@ -1,1 +0,0 @@ |
|
1341 | 1566 | -a |
|
1342 | 1567 | diff --git a/b b/b |
|
1343 | 1568 | new file mode 100644 |
|
1344 | 1569 | --- /dev/null |
|
1345 | 1570 | +++ b/b |
|
1346 | 1571 | @@ -0,0 +1,1 @@ |
|
1347 | 1572 | +a |
|
1348 | 1573 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now