Show More
@@ -1215,6 +1215,21 b' def calculateupdates(' | |||||
1215 | repo.ui.note(_(b" %s: picking 'keep absent' action\n") % f) |
|
1215 | repo.ui.note(_(b" %s: picking 'keep absent' action\n") % f) | |
1216 | mresult.addfile(f, *bids[mergestatemod.ACTION_KEEP_ABSENT][0]) |
|
1216 | mresult.addfile(f, *bids[mergestatemod.ACTION_KEEP_ABSENT][0]) | |
1217 | continue |
|
1217 | continue | |
|
1218 | # ACTION_KEEP_NEW and ACTION_CHANGED_DELETED are conflicting actions | |||
|
1219 | # as one say that file is new while other says that file was present | |||
|
1220 | # earlier too and has a change delete conflict | |||
|
1221 | # Let's fall back to conflicting ACTION_CHANGED_DELETED and let user | |||
|
1222 | # do the right thing | |||
|
1223 | if ( | |||
|
1224 | mergestatemod.ACTION_CHANGED_DELETED in bids | |||
|
1225 | and mergestatemod.ACTION_KEEP_NEW in bids | |||
|
1226 | and len(bids) == 2 | |||
|
1227 | ): | |||
|
1228 | repo.ui.note(_(b" %s: picking 'changed/deleted' action\n") % f) | |||
|
1229 | mresult.addfile( | |||
|
1230 | f, *bids[mergestatemod.ACTION_CHANGED_DELETED][0] | |||
|
1231 | ) | |||
|
1232 | continue | |||
1218 | # If keep new is an option, let's just do that |
|
1233 | # If keep new is an option, let's just do that | |
1219 | if mergestatemod.ACTION_KEEP_NEW in bids: |
|
1234 | if mergestatemod.ACTION_KEEP_NEW in bids: | |
1220 | repo.ui.note(_(b" %s: picking 'keep new' action\n") % f) |
|
1235 | repo.ui.note(_(b" %s: picking 'keep new' action\n") % f) |
@@ -855,30 +855,61 b' BROKEN: this should result in conflict' | |||||
855 | no merge state found |
|
855 | no merge state found | |
856 |
|
856 | |||
857 | (merging a deletion with keeping β conflict) |
|
857 | (merging a deletion with keeping β conflict) | |
858 | BROKEN: this should result in conflict |
|
|||
859 |
|
858 | |||
860 | $ hg update --clean 'desc("merge-keeping-the-file-from-deleted")' |
|
859 | $ hg update --clean 'desc("merge-keeping-the-file-from-deleted")' | |
861 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
860 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
861 | #if newfilenode | |||
|
862 | $ hg merge 'desc("merge-deleting-the-file-from-deleted")' | |||
|
863 | file 'the-file' was deleted in other [merge rev] but was modified in local [working copy]. | |||
|
864 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. | |||
|
865 | What do you want to do? u | |||
|
866 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |||
|
867 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |||
|
868 | [1] | |||
|
869 | #else | |||
862 | $ hg merge 'desc("merge-deleting-the-file-from-deleted")' |
|
870 | $ hg merge 'desc("merge-deleting-the-file-from-deleted")' | |
863 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
871 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
864 | (branch merge, don't forget to commit) |
|
872 | (branch merge, don't forget to commit) | |
|
873 | #endif | |||
865 | $ ls -1 |
|
874 | $ ls -1 | |
866 | other-file |
|
875 | other-file | |
867 | the-file |
|
876 | the-file | |
|
877 | ||||
|
878 | #if newfilenode | |||
868 | $ hg debugmergestate |
|
879 | $ hg debugmergestate | |
869 | local (working copy): 38a4c3e7cac8c294ecb0a7a85a05464e9836ca78 (newfilenode !) |
|
880 | local (working copy): 38a4c3e7cac8c294ecb0a7a85a05464e9836ca78 (newfilenode !) | |
870 | local (working copy): e9b7081317232edce73f7ad5ae0b7807ff5c326a (old !) |
|
881 | local (working copy): e9b7081317232edce73f7ad5ae0b7807ff5c326a (old !) | |
871 | other (merge rev): adfd88e5d7d3d3e22bdd26512991ee64d59c1d8f |
|
882 | other (merge rev): adfd88e5d7d3d3e22bdd26512991ee64d59c1d8f | |
|
883 | file: the-file (state "u") | |||
|
884 | local path: the-file (hash 6d2e02da5a9fe0691363dc6b573845fa271eaa35, flags "") | |||
|
885 | ancestor path: the-file (node 59e363a07dc876278f0e41756236f30213b6b460) | |||
|
886 | other path: the-file (node 0000000000000000000000000000000000000000) | |||
|
887 | extra: ancestorlinknode = 9b610631ab29024c5f44af7d2c19658ef8f8f071 | |||
|
888 | extra: merge-removal-candidate = yes | |||
|
889 | #else | |||
|
890 | $ hg debugmergestate | |||
|
891 | local (working copy): e9b7081317232edce73f7ad5ae0b7807ff5c326a | |||
|
892 | other (merge rev): adfd88e5d7d3d3e22bdd26512991ee64d59c1d8f | |||
872 | extra: the-file (merge-removal-candidate = yes) |
|
893 | extra: the-file (merge-removal-candidate = yes) | |
|
894 | #endif | |||
873 |
|
895 | |||
874 | (merging a deletion with keeping β conflict) |
|
896 | (merging a deletion with keeping β conflict) | |
875 | BROKEN: this should result in conflict |
|
|||
876 |
|
897 | |||
877 | $ hg update --clean 'desc("merge-keeping-the-file-from-deleted")' |
|
898 | $ hg update --clean 'desc("merge-keeping-the-file-from-deleted")' | |
878 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
899 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
900 | #if newfilenode | |||
|
901 | $ hg merge 'desc("merge-deleting-the-file-from-updated")' | |||
|
902 | file 'the-file' was deleted in other [merge rev] but was modified in local [working copy]. | |||
|
903 | You can use (c)hanged version, (d)elete, or leave (u)nresolved. | |||
|
904 | What do you want to do? u | |||
|
905 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |||
|
906 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |||
|
907 | [1] | |||
|
908 | #else | |||
879 | $ hg merge 'desc("merge-deleting-the-file-from-updated")' |
|
909 | $ hg merge 'desc("merge-deleting-the-file-from-updated")' | |
880 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
910 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
881 | (branch merge, don't forget to commit) |
|
911 | (branch merge, don't forget to commit) | |
|
912 | #endif | |||
882 | $ ls -1 |
|
913 | $ ls -1 | |
883 | other-file |
|
914 | other-file | |
884 | the-file |
|
915 | the-file | |
@@ -886,7 +917,12 b' BROKEN: this should result in conflict' | |||||
886 | $ hg debugmergestate |
|
917 | $ hg debugmergestate | |
887 | local (working copy): 38a4c3e7cac8c294ecb0a7a85a05464e9836ca78 |
|
918 | local (working copy): 38a4c3e7cac8c294ecb0a7a85a05464e9836ca78 | |
888 | other (merge rev): a4e0e44229dc130be2915b92c957c093f8c7ee3e |
|
919 | other (merge rev): a4e0e44229dc130be2915b92c957c093f8c7ee3e | |
889 | extra: the-file (merge-removal-candidate = yes) |
|
920 | file: the-file (state "u") | |
|
921 | local path: the-file (hash 6d2e02da5a9fe0691363dc6b573845fa271eaa35, flags "") | |||
|
922 | ancestor path: the-file (node 59e363a07dc876278f0e41756236f30213b6b460) | |||
|
923 | other path: the-file (node 0000000000000000000000000000000000000000) | |||
|
924 | extra: ancestorlinknode = 9b610631ab29024c5f44af7d2c19658ef8f8f071 | |||
|
925 | extra: merge-removal-candidate = yes | |||
890 | #else |
|
926 | #else | |
891 | $ hg debugmergestate |
|
927 | $ hg debugmergestate | |
892 | local (working copy): e9b7081317232edce73f7ad5ae0b7807ff5c326a |
|
928 | local (working copy): e9b7081317232edce73f7ad5ae0b7807ff5c326a |
General Comments 0
You need to be logged in to leave comments.
Login now