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