##// END OF EJS Templates
merge: add missing ACTION_KEEP when both remote and ancestor are not present...
Pulkit Goyal -
r46041:49ffaa4f default
parent child Browse files
Show More
@@ -932,6 +932,14 b' def manifestmerge('
932 932 mresult.addfile(
933 933 f, mergestatemod.ACTION_REMOVE, None, b'other deleted',
934 934 )
935 else: # file not in ancestor, not in remote
936 mresult.addfile(
937 f,
938 mergestatemod.ACTION_KEEP,
939 None,
940 b'ancestor missing, remote missing',
941 )
942
935 943 elif n2: # file exists only on remote side
936 944 if f in copied1:
937 945 pass # we'll deal with it on m1 side
@@ -431,6 +431,8 b' Verify that the old context ancestor wor'
431 431 resolving manifests
432 432 branchmerge: True, force: False, partial: False
433 433 ancestor: 11b5b303e36c, local: c0ef19750a22+, remote: 6ca01f7342b9
434 d1/a: ancestor missing, remote missing -> k
435 d1/b: ancestor missing, remote missing -> k
434 436 d2/b: remote created -> g
435 437
436 438 calculating bids for ancestor 154e6000f54e
@@ -450,24 +452,24 b' Verify that the old context ancestor wor'
450 452
451 453 auction for merging merge bids (2 ancestors)
452 454 list of bids for d1/a:
455 ancestor missing, remote missing -> k
453 456 other deleted -> r
454 d1/a: consensus for r
457 d1/a: picking 'keep' action
455 458 list of bids for d1/b:
459 ancestor missing, remote missing -> k
456 460 other deleted -> r
457 d1/b: consensus for r
461 d1/b: picking 'keep' action
458 462 list of bids for d2/b:
459 463 remote created -> g
460 464 remote created -> g
461 465 d2/b: consensus for g
462 466 end of auction
463 467
464 d1/a: other deleted -> r
465 removing d1/a
466 d1/b: other deleted -> r
467 removing d1/b
468 468 d2/b: remote created -> g
469 469 getting d2/b
470 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
470 d1/a: ancestor missing, remote missing -> k
471 d1/b: ancestor missing, remote missing -> k
472 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
471 473 (branch merge, don't forget to commit)
472 474
473 475
@@ -649,15 +651,16 b' BROKEN: this should result in conflict'
649 651 $ hg update --clean 'desc("merge-keeping-the-file-from-updated")'
650 652 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
651 653 $ hg merge 'desc("merge-deleting-the-file-from-updated")'
652 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
654 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
653 655 (branch merge, don't forget to commit)
654 656 $ ls -1
655 657 other-file
658 the-file
656 659
657 660 (merging two "keeping" together → no conflict)
658 661
659 662 $ hg update --clean 'desc("merge-keeping-the-file-from-deleted")'
660 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
663 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
661 664 $ hg merge 'desc("merge-keeping-the-file-from-updated")'
662 665 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
663 666 (branch merge, don't forget to commit)
@@ -683,7 +686,8 b' BROKEN: this should result in conflict'
683 686 $ hg update --clean 'desc("merge-keeping-the-file-from-deleted")'
684 687 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
685 688 $ hg merge 'desc("merge-deleting-the-file-from-updated")'
686 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
689 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
687 690 (branch merge, don't forget to commit)
688 691 $ ls -1
689 692 other-file
693 the-file
General Comments 0
You need to be logged in to leave comments. Login now