Show More
This diff has been collapsed as it changes many lines, (504 lines changed) Show them Hide them | |||
@@ -135,9 +135,11 b' Having another branch renaming a differe' | |||
|
135 | 135 | o 0 i-0 initial commit: a b h |
|
136 | 136 | |
|
137 | 137 | |
|
138 | Merge the two branches we just defined (in both directions) | |
|
139 | - one with change to an unrelated file | |
|
140 | - one with renames in them | |
|
138 | merging with unrelated change does not interfere with the renames | |
|
139 | --------------------------------------------------------------- | |
|
140 | ||
|
141 | - rename on one side | |
|
142 | - unrelated change on the other side | |
|
141 | 143 | |
|
142 | 144 | $ hg up 'desc("b-1")' |
|
143 | 145 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
@@ -170,7 +172,43 b' Merge the two branches we just defined (' | |||
|
170 | 172 | o 0 i-0 initial commit: a b h |
|
171 | 173 | |
|
172 | 174 | |
|
173 | Merge: | |
|
175 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' | |
|
176 | A f | |
|
177 | d | |
|
178 | R d | |
|
179 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' | |
|
180 | A f | |
|
181 | d | |
|
182 | R d | |
|
183 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' | |
|
184 | M b | |
|
185 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' | |
|
186 | M b | |
|
187 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' | |
|
188 | M b | |
|
189 | A f | |
|
190 | d | |
|
191 | R d | |
|
192 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' | |
|
193 | M b | |
|
194 | A f | |
|
195 | d | |
|
196 | R d | |
|
197 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' | |
|
198 | M b | |
|
199 | A f | |
|
200 | a | |
|
201 | R a | |
|
202 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' | |
|
203 | M b | |
|
204 | A f | |
|
205 | a | |
|
206 | R a | |
|
207 | ||
|
208 | merging with the side having a delete | |
|
209 | ------------------------------------- | |
|
210 | ||
|
211 | case summary: | |
|
174 | 212 | - one with change to an unrelated file |
|
175 | 213 | - one deleting the change |
|
176 | 214 | and recreate an unrelated file after the merge |
@@ -213,272 +251,6 b' and recreate an unrelated file after the' | |||
|
213 | 251 | | |
|
214 | 252 | o 0 i-0 initial commit: a b h |
|
215 | 253 | |
|
216 | ||
|
217 | Merge: | |
|
218 | - one with change to an unrelated file | |
|
219 | - one deleting and recreating the file | |
|
220 | ||
|
221 | Note: | |
|
222 | | In this case, the merge get conflicting information since on one side we have | |
|
223 | | a "brand new" d. and one the other one we have "d renamed from c (itself | |
|
224 | | renamed from c)". | |
|
225 | | | |
|
226 | | The current code arbitrarily pick one side | |
|
227 | ||
|
228 | $ hg up 'desc("b-1")' | |
|
229 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
230 | $ hg merge 'desc("d-2")' | |
|
231 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
232 | (branch merge, don't forget to commit) | |
|
233 | $ hg ci -m 'mBDm-0 simple merge - one way' | |
|
234 | $ hg up 'desc("d-2")' | |
|
235 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
236 | $ hg merge 'desc("b-1")' | |
|
237 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
238 | (branch merge, don't forget to commit) | |
|
239 | $ hg ci -m 'mDBm-0 simple merge - the other way' | |
|
240 | created new head | |
|
241 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | |
|
242 | @ 18 mDBm-0 simple merge - the other way | |
|
243 | |\ | |
|
244 | +---o 17 mBDm-0 simple merge - one way | |
|
245 | | |/ | |
|
246 | | o 8 d-2 re-add d | |
|
247 | | | | |
|
248 | | o 7 d-1 delete d | |
|
249 | | | | |
|
250 | o | 5 b-1: b update | |
|
251 | |/ | |
|
252 | o 2 i-2: c -move-> d | |
|
253 | | | |
|
254 | o 1 i-1: a -move-> c | |
|
255 | | | |
|
256 | o 0 i-0 initial commit: a b h | |
|
257 | ||
|
258 | ||
|
259 | Merge: | |
|
260 | - the "e-" branch renaming b to f (through 'g') | |
|
261 | - the "a-" branch renaming d to f (through e) | |
|
262 | ||
|
263 | $ hg up 'desc("a-2")' | |
|
264 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
265 | $ hg merge 'desc("e-2")' | |
|
266 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
267 | (branch merge, don't forget to commit) | |
|
268 | $ hg ci -m 'mAEm-0 simple merge - one way' | |
|
269 | $ hg up 'desc("e-2")' | |
|
270 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
271 | $ hg merge 'desc("a-2")' | |
|
272 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
273 | (branch merge, don't forget to commit) | |
|
274 | $ hg ci -m 'mEAm-0 simple merge - the other way' | |
|
275 | created new head | |
|
276 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | |
|
277 | @ 20 mEAm-0 simple merge - the other way | |
|
278 | |\ | |
|
279 | +---o 19 mAEm-0 simple merge - one way | |
|
280 | | |/ | |
|
281 | | o 10 e-2 g -move-> f | |
|
282 | | | | |
|
283 | | o 9 e-1 b -move-> g | |
|
284 | | | | |
|
285 | o | 4 a-2: e -move-> f | |
|
286 | | | | |
|
287 | o | 3 a-1: d -move-> e | |
|
288 | |/ | |
|
289 | o 2 i-2: c -move-> d | |
|
290 | | | |
|
291 | o 1 i-1: a -move-> c | |
|
292 | | | |
|
293 | o 0 i-0 initial commit: a b h | |
|
294 | ||
|
295 | ||
|
296 | Note: | |
|
297 | | In this case, one of the merge wrongly record a merge while there is none. | |
|
298 | | This lead to bad copy tracing information to be dug up. | |
|
299 | ||
|
300 | ||
|
301 | Merge: | |
|
302 | - one with change to an unrelated file (b) | |
|
303 | - one overwriting a file (d) with a rename (from h to i to d) | |
|
304 | ||
|
305 | $ hg up 'desc("i-2")' | |
|
306 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
307 | $ hg mv h i | |
|
308 | $ hg commit -m "f-1: rename h -> i" | |
|
309 | created new head | |
|
310 | $ hg mv --force i d | |
|
311 | $ hg commit -m "f-2: rename i -> d" | |
|
312 | $ hg debugindex d | |
|
313 | rev linkrev nodeid p1 p2 | |
|
314 | 0 2 01c2f5eabdc4 000000000000 000000000000 | |
|
315 | 1 8 b004912a8510 000000000000 000000000000 | |
|
316 | 2 17 0bb5445dc4d0 01c2f5eabdc4 b004912a8510 | |
|
317 | 3 22 c72365ee036f 000000000000 000000000000 | |
|
318 | $ hg up 'desc("b-1")' | |
|
319 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
320 | $ hg merge 'desc("f-2")' | |
|
321 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
322 | (branch merge, don't forget to commit) | |
|
323 | $ hg ci -m 'mBFm-0 simple merge - one way' | |
|
324 | $ hg up 'desc("f-2")' | |
|
325 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
326 | $ hg merge 'desc("b-1")' | |
|
327 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
328 | (branch merge, don't forget to commit) | |
|
329 | $ hg ci -m 'mFBm-0 simple merge - the other way' | |
|
330 | created new head | |
|
331 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' | |
|
332 | @ 24 mFBm-0 simple merge - the other way | |
|
333 | |\ | |
|
334 | +---o 23 mBFm-0 simple merge - one way | |
|
335 | | |/ | |
|
336 | | o 22 f-2: rename i -> d | |
|
337 | | | | |
|
338 | | o 21 f-1: rename h -> i | |
|
339 | | | | |
|
340 | o | 5 b-1: b update | |
|
341 | |/ | |
|
342 | o 2 i-2: c -move-> d | |
|
343 | | | |
|
344 | o 1 i-1: a -move-> c | |
|
345 | | | |
|
346 | o 0 i-0 initial commit: a b h | |
|
347 | ||
|
348 | ||
|
349 | Merge: | |
|
350 | - one with change to a file | |
|
351 | - one deleting and recreating the file | |
|
352 | ||
|
353 | $ hg up 'desc("i-2")' | |
|
354 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
355 | $ echo "some update" >> d | |
|
356 | $ hg commit -m "g-1: update d" | |
|
357 | created new head | |
|
358 | $ hg up 'desc("d-2")' | |
|
359 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
360 | $ hg merge 'desc("g-1")' --tool :union | |
|
361 | merging d | |
|
362 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
363 | (branch merge, don't forget to commit) | |
|
364 | $ hg ci -m 'mDGm-0 simple merge - one way' | |
|
365 | $ hg up 'desc("g-1")' | |
|
366 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
367 | $ hg merge 'desc("d-2")' --tool :union | |
|
368 | merging d | |
|
369 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
370 | (branch merge, don't forget to commit) | |
|
371 | $ hg ci -m 'mGDm-0 simple merge - the other way' | |
|
372 | created new head | |
|
373 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' | |
|
374 | @ 27 mGDm-0 simple merge - the other way | |
|
375 | |\ | |
|
376 | +---o 26 mDGm-0 simple merge - one way | |
|
377 | | |/ | |
|
378 | | o 25 g-1: update d | |
|
379 | | | | |
|
380 | o | 8 d-2 re-add d | |
|
381 | | | | |
|
382 | o | 7 d-1 delete d | |
|
383 | |/ | |
|
384 | o 2 i-2: c -move-> d | |
|
385 | | | |
|
386 | o 1 i-1: a -move-> c | |
|
387 | | | |
|
388 | o 0 i-0 initial commit: a b h | |
|
389 | ||
|
390 | ||
|
391 | ||
|
392 | Merge: | |
|
393 | - one with change to a file (d) | |
|
394 | - one overwriting that file with a rename (from h to i, to d) | |
|
395 | ||
|
396 | $ hg up 'desc("f-2")' | |
|
397 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
398 | $ hg merge 'desc("g-1")' --tool :union | |
|
399 | merging d | |
|
400 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
|
401 | (branch merge, don't forget to commit) | |
|
402 | $ hg ci -m 'mFGm-0 simple merge - one way' | |
|
403 | created new head | |
|
404 | $ hg up 'desc("g-1")' | |
|
405 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
406 | $ hg merge 'desc("f-2")' --tool :union | |
|
407 | merging d | |
|
408 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
|
409 | (branch merge, don't forget to commit) | |
|
410 | $ hg ci -m 'mGFm-0 simple merge - the other way' | |
|
411 | created new head | |
|
412 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' | |
|
413 | @ 29 mGFm-0 simple merge - the other way | |
|
414 | |\ | |
|
415 | +---o 28 mFGm-0 simple merge - one way | |
|
416 | | |/ | |
|
417 | | o 25 g-1: update d | |
|
418 | | | | |
|
419 | o | 22 f-2: rename i -> d | |
|
420 | | | | |
|
421 | o | 21 f-1: rename h -> i | |
|
422 | |/ | |
|
423 | o 2 i-2: c -move-> d | |
|
424 | | | |
|
425 | o 1 i-1: a -move-> c | |
|
426 | | | |
|
427 | o 0 i-0 initial commit: a b h | |
|
428 | ||
|
429 | ||
|
430 | ||
|
431 | Check results | |
|
432 | ============= | |
|
433 | ||
|
434 | merging with unrelated change does not interfer wit the renames | |
|
435 | --------------------------------------------------------------- | |
|
436 | ||
|
437 | - rename on one side | |
|
438 | - unrelated change on the other side | |
|
439 | ||
|
440 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mABm")' | |
|
441 | A f | |
|
442 | d | |
|
443 | R d | |
|
444 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBAm")' | |
|
445 | A f | |
|
446 | d | |
|
447 | R d | |
|
448 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mABm")' | |
|
449 | M b | |
|
450 | $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mBAm")' | |
|
451 | M b | |
|
452 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mABm")' | |
|
453 | M b | |
|
454 | A f | |
|
455 | d | |
|
456 | R d | |
|
457 | $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mBAm")' | |
|
458 | M b | |
|
459 | A f | |
|
460 | d | |
|
461 | R d | |
|
462 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mABm")' | |
|
463 | M b | |
|
464 | A f | |
|
465 | a | |
|
466 | R a | |
|
467 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBAm")' | |
|
468 | M b | |
|
469 | A f | |
|
470 | a | |
|
471 | R a | |
|
472 | ||
|
473 | merging with the side having a delete | |
|
474 | ------------------------------------- | |
|
475 | ||
|
476 | case summary: | |
|
477 | - one with change to an unrelated file | |
|
478 | - one deleting the change | |
|
479 | and recreate an unrelated file after the merge | |
|
480 | ||
|
481 | checks: | |
|
482 | 254 | - comparing from the merge |
|
483 | 255 | |
|
484 | 256 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBCm-0")' |
@@ -540,6 +312,36 b' Note:' | |||
|
540 | 312 | | In this case, one of the merge wrongly record a merge while there is none. |
|
541 | 313 | | This lead to bad copy tracing information to be dug up. |
|
542 | 314 | |
|
315 | $ hg up 'desc("b-1")' | |
|
316 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
317 | $ hg merge 'desc("d-2")' | |
|
318 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
319 | (branch merge, don't forget to commit) | |
|
320 | $ hg ci -m 'mBDm-0 simple merge - one way' | |
|
321 | $ hg up 'desc("d-2")' | |
|
322 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
323 | $ hg merge 'desc("b-1")' | |
|
324 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
325 | (branch merge, don't forget to commit) | |
|
326 | $ hg ci -m 'mDBm-0 simple merge - the other way' | |
|
327 | created new head | |
|
328 | $ hg log -G --rev '::(desc("mDBm")+desc("mBDm"))' | |
|
329 | @ 18 mDBm-0 simple merge - the other way | |
|
330 | |\ | |
|
331 | +---o 17 mBDm-0 simple merge - one way | |
|
332 | | |/ | |
|
333 | | o 8 d-2 re-add d | |
|
334 | | | | |
|
335 | | o 7 d-1 delete d | |
|
336 | | | | |
|
337 | o | 5 b-1: b update | |
|
338 | |/ | |
|
339 | o 2 i-2: c -move-> d | |
|
340 | | | |
|
341 | o 1 i-1: a -move-> c | |
|
342 | | | |
|
343 | o 0 i-0 initial commit: a b h | |
|
344 | ||
|
543 | 345 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBDm-0")' |
|
544 | 346 | M d |
|
545 | 347 | $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mDBm-0")' |
@@ -577,12 +379,6 b' not a merge.' | |||
|
577 | 379 | 0 2 01c2f5eabdc4 000000000000 000000000000 |
|
578 | 380 | 1 8 b004912a8510 000000000000 000000000000 |
|
579 | 381 | 2 17 0bb5445dc4d0 01c2f5eabdc4 b004912a8510 |
|
580 | 3 22 c72365ee036f 000000000000 000000000000 | |
|
581 | 4 23 863d9bc49190 01c2f5eabdc4 c72365ee036f | |
|
582 | 5 25 7bded9d9da1f 01c2f5eabdc4 000000000000 | |
|
583 | 6 26 f04cac32d703 b004912a8510 7bded9d9da1f | |
|
584 | 7 27 d7a5eafb9322 7bded9d9da1f b004912a8510 | |
|
585 | 8 28 2ed7a51aed47 c72365ee036f 7bded9d9da1f | |
|
586 | 382 | |
|
587 | 383 | (This `hg log` output if wrong, since no merge actually happened). |
|
588 | 384 | |
@@ -615,12 +411,45 b' This `hg log` output is correct' | |||
|
615 | 411 | A d |
|
616 | 412 | R a |
|
617 | 413 | |
|
414 | ||
|
618 | 415 | Comparing with a merge with colliding rename |
|
619 | 416 | -------------------------------------------- |
|
620 | 417 | |
|
621 | 418 | - the "e-" branch renaming b to f (through 'g') |
|
622 | 419 | - the "a-" branch renaming d to f (through e) |
|
623 | 420 | |
|
421 | $ hg up 'desc("a-2")' | |
|
422 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
423 | $ hg merge 'desc("e-2")' | |
|
424 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
425 | (branch merge, don't forget to commit) | |
|
426 | $ hg ci -m 'mAEm-0 simple merge - one way' | |
|
427 | $ hg up 'desc("e-2")' | |
|
428 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
429 | $ hg merge 'desc("a-2")' | |
|
430 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
431 | (branch merge, don't forget to commit) | |
|
432 | $ hg ci -m 'mEAm-0 simple merge - the other way' | |
|
433 | created new head | |
|
434 | $ hg log -G --rev '::(desc("mAEm")+desc("mEAm"))' | |
|
435 | @ 20 mEAm-0 simple merge - the other way | |
|
436 | |\ | |
|
437 | +---o 19 mAEm-0 simple merge - one way | |
|
438 | | |/ | |
|
439 | | o 10 e-2 g -move-> f | |
|
440 | | | | |
|
441 | | o 9 e-1 b -move-> g | |
|
442 | | | | |
|
443 | o | 4 a-2: e -move-> f | |
|
444 | | | | |
|
445 | o | 3 a-1: d -move-> e | |
|
446 | |/ | |
|
447 | o 2 i-2: c -move-> d | |
|
448 | | | |
|
449 | o 1 i-1: a -move-> c | |
|
450 | | | |
|
451 | o 0 i-0 initial commit: a b h | |
|
452 | ||
|
624 | 453 |
$ |
|
625 | 454 | eb806e34ef6be4c264effd5933d31004ad15a793 644 f |
|
626 | 455 | $ hg manifest --debug --rev 'desc("mEAm-0")' | grep '644 f' |
@@ -675,10 +504,59 b' Comparing with a merge with colliding re' | |||
|
675 | 504 | R a |
|
676 | 505 | R b |
|
677 | 506 | |
|
507 | ||
|
508 | Note: | |
|
509 | | In this case, one of the merge wrongly record a merge while there is none. | |
|
510 | | This lead to bad copy tracing information to be dug up. | |
|
511 | ||
|
512 | ||
|
678 | 513 | Merge: |
|
679 | 514 | - one with change to an unrelated file (b) |
|
680 | 515 | - one overwriting a file (d) with a rename (from h to i to d) |
|
681 | 516 | |
|
517 | $ hg up 'desc("i-2")' | |
|
518 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
519 | $ hg mv h i | |
|
520 | $ hg commit -m "f-1: rename h -> i" | |
|
521 | created new head | |
|
522 | $ hg mv --force i d | |
|
523 | $ hg commit -m "f-2: rename i -> d" | |
|
524 | $ hg debugindex d | |
|
525 | rev linkrev nodeid p1 p2 | |
|
526 | 0 2 01c2f5eabdc4 000000000000 000000000000 | |
|
527 | 1 8 b004912a8510 000000000000 000000000000 | |
|
528 | 2 17 0bb5445dc4d0 01c2f5eabdc4 b004912a8510 | |
|
529 | 3 22 c72365ee036f 000000000000 000000000000 | |
|
530 | $ hg up 'desc("b-1")' | |
|
531 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
532 | $ hg merge 'desc("f-2")' | |
|
533 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
534 | (branch merge, don't forget to commit) | |
|
535 | $ hg ci -m 'mBFm-0 simple merge - one way' | |
|
536 | $ hg up 'desc("f-2")' | |
|
537 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
538 | $ hg merge 'desc("b-1")' | |
|
539 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
540 | (branch merge, don't forget to commit) | |
|
541 | $ hg ci -m 'mFBm-0 simple merge - the other way' | |
|
542 | created new head | |
|
543 | $ hg log -G --rev '::(desc("mBFm")+desc("mFBm"))' | |
|
544 | @ 24 mFBm-0 simple merge - the other way | |
|
545 | |\ | |
|
546 | +---o 23 mBFm-0 simple merge - one way | |
|
547 | | |/ | |
|
548 | | o 22 f-2: rename i -> d | |
|
549 | | | | |
|
550 | | o 21 f-1: rename h -> i | |
|
551 | | | | |
|
552 | o | 5 b-1: b update | |
|
553 | |/ | |
|
554 | o 2 i-2: c -move-> d | |
|
555 | | | |
|
556 | o 1 i-1: a -move-> c | |
|
557 | | | |
|
558 | o 0 i-0 initial commit: a b h | |
|
559 | ||
|
682 | 560 | The overwriting should take over. However, the behavior is currently buggy |
|
683 | 561 | |
|
684 | 562 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mBFm-0")' |
@@ -740,13 +618,51 b' The following output is correct.' | |||
|
740 | 618 | o 0 i-0 initial commit: a b h |
|
741 | 619 | |
|
742 | 620 | |
|
621 | ||
|
743 | 622 | Merge: |
|
744 | 623 | - one with change to a file |
|
745 | 624 | - one deleting and recreating the file |
|
746 | 625 | |
|
747 |
Unlike in the 'BD/DB' cases, an actual |
|
|
626 | Unlike in the 'BD/DB' cases, an actual merge happened here. So we should | |
|
748 | 627 | consider history and rename on both branch of the merge. |
|
749 | 628 | |
|
629 | $ hg up 'desc("i-2")' | |
|
630 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
631 | $ echo "some update" >> d | |
|
632 | $ hg commit -m "g-1: update d" | |
|
633 | created new head | |
|
634 | $ hg up 'desc("d-2")' | |
|
635 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
636 | $ hg merge 'desc("g-1")' --tool :union | |
|
637 | merging d | |
|
638 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
639 | (branch merge, don't forget to commit) | |
|
640 | $ hg ci -m 'mDGm-0 simple merge - one way' | |
|
641 | $ hg up 'desc("g-1")' | |
|
642 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
643 | $ hg merge 'desc("d-2")' --tool :union | |
|
644 | merging d | |
|
645 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
646 | (branch merge, don't forget to commit) | |
|
647 | $ hg ci -m 'mGDm-0 simple merge - the other way' | |
|
648 | created new head | |
|
649 | $ hg log -G --rev '::(desc("mDGm")+desc("mGDm"))' | |
|
650 | @ 27 mGDm-0 simple merge - the other way | |
|
651 | |\ | |
|
652 | +---o 26 mDGm-0 simple merge - one way | |
|
653 | | |/ | |
|
654 | | o 25 g-1: update d | |
|
655 | | | | |
|
656 | o | 8 d-2 re-add d | |
|
657 | | | | |
|
658 | o | 7 d-1 delete d | |
|
659 | |/ | |
|
660 | o 2 i-2: c -move-> d | |
|
661 | | | |
|
662 | o 1 i-1: a -move-> c | |
|
663 | | | |
|
664 | o 0 i-0 initial commit: a b h | |
|
665 | ||
|
750 | 666 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")' |
|
751 | 667 | A d |
|
752 | 668 | a |
@@ -807,6 +723,39 b' Note:' | |||
|
807 | 723 | | |
|
808 | 724 | | The current code arbitrarily pick one side |
|
809 | 725 | |
|
726 | $ hg up 'desc("f-2")' | |
|
727 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
728 | $ hg merge 'desc("g-1")' --tool :union | |
|
729 | merging d | |
|
730 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
|
731 | (branch merge, don't forget to commit) | |
|
732 | $ hg ci -m 'mFGm-0 simple merge - one way' | |
|
733 | created new head | |
|
734 | $ hg up 'desc("g-1")' | |
|
735 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
736 | $ hg merge 'desc("f-2")' --tool :union | |
|
737 | merging d | |
|
738 | 0 files updated, 1 files merged, 1 files removed, 0 files unresolved | |
|
739 | (branch merge, don't forget to commit) | |
|
740 | $ hg ci -m 'mGFm-0 simple merge - the other way' | |
|
741 | created new head | |
|
742 | $ hg log -G --rev '::(desc("mGFm")+desc("mFGm"))' | |
|
743 | @ 29 mGFm-0 simple merge - the other way | |
|
744 | |\ | |
|
745 | +---o 28 mFGm-0 simple merge - one way | |
|
746 | | |/ | |
|
747 | | o 25 g-1: update d | |
|
748 | | | | |
|
749 | o | 22 f-2: rename i -> d | |
|
750 | | | | |
|
751 | o | 21 f-1: rename h -> i | |
|
752 | |/ | |
|
753 | o 2 i-2: c -move-> d | |
|
754 | | | |
|
755 | o 1 i-1: a -move-> c | |
|
756 | | | |
|
757 | o 0 i-0 initial commit: a b h | |
|
758 | ||
|
810 | 759 | $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")' |
|
811 | 760 | A d |
|
812 | 761 | a |
@@ -850,7 +799,6 b' Note:' | |||
|
850 | 799 | o 0 i-0 initial commit: a b h |
|
851 | 800 | |
|
852 | 801 | |
|
853 | ||
|
854 | 802 | $ hg log -Gfr 'desc("mGFm-0")' d |
|
855 | 803 | @ 29 mGFm-0 simple merge - the other way |
|
856 | 804 | |\ |
General Comments 0
You need to be logged in to leave comments.
Login now