Mercurial > hg
comparison tests/test-merge-changedelete.t @ 39277:f785073f792c
merge: improve interactive one-changed one-deleted message (issue5550)
I like the wording from the bug, so I figured I'd package it up in a
change and see what people think.
Differential Revision: https://phab.mercurial-scm.org/D4336
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 20 Aug 2018 13:29:48 -0400 |
parents | 41ef02ba329b |
children | 975d959295ef |
comparison
equal
deleted
inserted
replaced
39276:337443f09fc8 | 39277:f785073f792c |
---|---|
52 | 52 |
53 | 53 |
54 Non-interactive merge: | 54 Non-interactive merge: |
55 | 55 |
56 $ hg merge -y | 56 $ hg merge -y |
57 local [working copy] changed file1 which other [merge rev] deleted | 57 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
58 What do you want to do? | |
58 use (c)hanged version, (d)elete, or leave (u)nresolved? u | 59 use (c)hanged version, (d)elete, or leave (u)nresolved? u |
59 other [merge rev] changed file2 which local [working copy] deleted | 60 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
61 What do you want to do? | |
60 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | 62 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
61 merging file3 | 63 merging file3 |
62 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | 64 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
63 0 files updated, 0 files merged, 0 files removed, 3 files unresolved | 65 0 files updated, 0 files merged, 0 files removed, 3 files unresolved |
64 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | 66 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
119 | 121 |
120 $ hg merge --config ui.interactive=true <<EOF | 122 $ hg merge --config ui.interactive=true <<EOF |
121 > c | 123 > c |
122 > d | 124 > d |
123 > EOF | 125 > EOF |
124 local [working copy] changed file1 which other [merge rev] deleted | 126 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
127 What do you want to do? | |
125 use (c)hanged version, (d)elete, or leave (u)nresolved? c | 128 use (c)hanged version, (d)elete, or leave (u)nresolved? c |
126 other [merge rev] changed file2 which local [working copy] deleted | 129 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
130 What do you want to do? | |
127 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? d | 131 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? d |
128 merging file3 | 132 merging file3 |
129 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | 133 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
130 0 files updated, 2 files merged, 0 files removed, 1 files unresolved | 134 0 files updated, 2 files merged, 0 files removed, 1 files unresolved |
131 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | 135 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
187 > bar | 191 > bar |
188 > d | 192 > d |
189 > baz | 193 > baz |
190 > c | 194 > c |
191 > EOF | 195 > EOF |
192 local [working copy] changed file1 which other [merge rev] deleted | 196 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
197 What do you want to do? | |
193 use (c)hanged version, (d)elete, or leave (u)nresolved? foo | 198 use (c)hanged version, (d)elete, or leave (u)nresolved? foo |
194 unrecognized response | 199 unrecognized response |
195 local [working copy] changed file1 which other [merge rev] deleted | 200 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
201 What do you want to do? | |
196 use (c)hanged version, (d)elete, or leave (u)nresolved? bar | 202 use (c)hanged version, (d)elete, or leave (u)nresolved? bar |
197 unrecognized response | 203 unrecognized response |
198 local [working copy] changed file1 which other [merge rev] deleted | 204 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
205 What do you want to do? | |
199 use (c)hanged version, (d)elete, or leave (u)nresolved? d | 206 use (c)hanged version, (d)elete, or leave (u)nresolved? d |
200 other [merge rev] changed file2 which local [working copy] deleted | 207 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
208 What do you want to do? | |
201 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? baz | 209 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? baz |
202 unrecognized response | 210 unrecognized response |
203 other [merge rev] changed file2 which local [working copy] deleted | 211 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
212 What do you want to do? | |
204 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c | 213 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c |
205 merging file3 | 214 merging file3 |
206 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | 215 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
207 0 files updated, 1 files merged, 1 files removed, 1 files unresolved | 216 0 files updated, 1 files merged, 1 files removed, 1 files unresolved |
208 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | 217 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
260 1 other heads for branch "default" | 269 1 other heads for branch "default" |
261 | 270 |
262 $ hg merge --config ui.interactive=true <<EOF | 271 $ hg merge --config ui.interactive=true <<EOF |
263 > d | 272 > d |
264 > EOF | 273 > EOF |
265 local [working copy] changed file1 which other [merge rev] deleted | 274 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
275 What do you want to do? | |
266 use (c)hanged version, (d)elete, or leave (u)nresolved? d | 276 use (c)hanged version, (d)elete, or leave (u)nresolved? d |
267 other [merge rev] changed file2 which local [working copy] deleted | 277 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
278 What do you want to do? | |
268 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | 279 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
269 merging file3 | 280 merging file3 |
270 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | 281 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
271 0 files updated, 0 files merged, 1 files removed, 2 files unresolved | 282 0 files updated, 0 files merged, 1 files removed, 2 files unresolved |
272 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | 283 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
471 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 482 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
472 updated to "13910f48cf7b: changed file1, removed file2, changed file3" | 483 updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
473 1 other heads for branch "default" | 484 1 other heads for branch "default" |
474 | 485 |
475 $ hg merge --config ui.interactive=True --tool :prompt | 486 $ hg merge --config ui.interactive=True --tool :prompt |
476 local [working copy] changed file1 which other [merge rev] deleted | 487 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
488 What do you want to do? | |
477 use (c)hanged version, (d)elete, or leave (u)nresolved? | 489 use (c)hanged version, (d)elete, or leave (u)nresolved? |
478 other [merge rev] changed file2 which local [working copy] deleted | 490 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
491 What do you want to do? | |
479 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | 492 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
480 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? | 493 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? |
481 0 files updated, 0 files merged, 0 files removed, 3 files unresolved | 494 0 files updated, 0 files merged, 0 files removed, 3 files unresolved |
482 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | 495 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
483 [1] | 496 [1] |
530 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 543 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
531 updated to "13910f48cf7b: changed file1, removed file2, changed file3" | 544 updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
532 1 other heads for branch "default" | 545 1 other heads for branch "default" |
533 | 546 |
534 $ hg merge --tool :prompt | 547 $ hg merge --tool :prompt |
535 local [working copy] changed file1 which other [merge rev] deleted | 548 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
549 What do you want to do? | |
536 use (c)hanged version, (d)elete, or leave (u)nresolved? u | 550 use (c)hanged version, (d)elete, or leave (u)nresolved? u |
537 other [merge rev] changed file2 which local [working copy] deleted | 551 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
552 What do you want to do? | |
538 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | 553 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
539 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? u | 554 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? u |
540 0 files updated, 0 files merged, 0 files removed, 3 files unresolved | 555 0 files updated, 0 files merged, 0 files removed, 3 files unresolved |
541 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | 556 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
542 [1] | 557 [1] |
587 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 602 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
588 updated to "13910f48cf7b: changed file1, removed file2, changed file3" | 603 updated to "13910f48cf7b: changed file1, removed file2, changed file3" |
589 1 other heads for branch "default" | 604 1 other heads for branch "default" |
590 | 605 |
591 $ hg merge --tool :merge3 | 606 $ hg merge --tool :merge3 |
592 local [working copy] changed file1 which other [merge rev] deleted | 607 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
608 What do you want to do? | |
593 use (c)hanged version, (d)elete, or leave (u)nresolved? u | 609 use (c)hanged version, (d)elete, or leave (u)nresolved? u |
594 other [merge rev] changed file2 which local [working copy] deleted | 610 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
611 What do you want to do? | |
595 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | 612 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
596 merging file3 | 613 merging file3 |
597 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') | 614 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') |
598 0 files updated, 0 files merged, 0 files removed, 3 files unresolved | 615 0 files updated, 0 files merged, 0 files removed, 3 files unresolved |
599 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | 616 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
677 (no more unresolved files) | 694 (no more unresolved files) |
678 --- diff of status --- | 695 --- diff of status --- |
679 (status identical) | 696 (status identical) |
680 | 697 |
681 === :other -> :prompt === | 698 === :other -> :prompt === |
682 local [working copy] changed file1 which other [merge rev] deleted | 699 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
700 What do you want to do? | |
683 use (c)hanged version, (d)elete, or leave (u)nresolved? | 701 use (c)hanged version, (d)elete, or leave (u)nresolved? |
684 other [merge rev] changed file2 which local [working copy] deleted | 702 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
703 What do you want to do? | |
685 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | 704 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
686 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? | 705 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? |
687 --- diff of status --- | 706 --- diff of status --- |
688 (status identical) | 707 (status identical) |
689 | 708 |
705 (no more unresolved files) | 724 (no more unresolved files) |
706 --- diff of status --- | 725 --- diff of status --- |
707 (status identical) | 726 (status identical) |
708 | 727 |
709 === :local -> :prompt === | 728 === :local -> :prompt === |
710 local [working copy] changed file1 which other [merge rev] deleted | 729 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
730 What do you want to do? | |
711 use (c)hanged version, (d)elete, or leave (u)nresolved? | 731 use (c)hanged version, (d)elete, or leave (u)nresolved? |
712 other [merge rev] changed file2 which local [working copy] deleted | 732 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
733 What do you want to do? | |
713 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | 734 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
714 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? | 735 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? |
715 --- diff of status --- | 736 --- diff of status --- |
716 (status identical) | 737 (status identical) |
717 | 738 |
723 === :other -> :fail === | 744 === :other -> :fail === |
724 --- diff of status --- | 745 --- diff of status --- |
725 (status identical) | 746 (status identical) |
726 | 747 |
727 === :fail -> :prompt === | 748 === :fail -> :prompt === |
728 local [working copy] changed file1 which other [merge rev] deleted | 749 file file1 was deleted in local [working copy] but was modified in other [merge rev]. |
750 What do you want to do? | |
729 use (c)hanged version, (d)elete, or leave (u)nresolved? | 751 use (c)hanged version, (d)elete, or leave (u)nresolved? |
730 other [merge rev] changed file2 which local [working copy] deleted | 752 file file2 was deleted in other [merge rev] but was modified in local [working copy]. |
753 What do you want to do? | |
731 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | 754 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
732 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? | 755 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? |
733 --- diff of status --- | 756 --- diff of status --- |
734 (status identical) | 757 (status identical) |
735 | 758 |
749 $ hg co -C 0 | 772 $ hg co -C 0 |
750 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | 773 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
751 $ echo changed >> file1 | 774 $ echo changed >> file1 |
752 $ hg rm file2 | 775 $ hg rm file2 |
753 $ hg update 1 -y | 776 $ hg update 1 -y |
754 local [working copy] changed file1 which other [destination] deleted | 777 file file1 was deleted in local [working copy] but was modified in other [destination]. |
778 What do you want to do? | |
755 use (c)hanged version, (d)elete, or leave (u)nresolved? u | 779 use (c)hanged version, (d)elete, or leave (u)nresolved? u |
756 other [destination] changed file2 which local [working copy] deleted | 780 file file2 was deleted in other [destination] but was modified in local [working copy]. |
781 What do you want to do? | |
757 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | 782 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
758 1 files updated, 0 files merged, 0 files removed, 2 files unresolved | 783 1 files updated, 0 files merged, 0 files removed, 2 files unresolved |
759 use 'hg resolve' to retry unresolved file merges | 784 use 'hg resolve' to retry unresolved file merges |
760 [1] | 785 [1] |
761 $ status | 786 $ status |
925 $ hg co -C 0 | 950 $ hg co -C 0 |
926 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | 951 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
927 $ echo changed >> file1 | 952 $ echo changed >> file1 |
928 $ hg rm file2 | 953 $ hg rm file2 |
929 $ hg update 1 --config ui.interactive=True --tool :prompt | 954 $ hg update 1 --config ui.interactive=True --tool :prompt |
930 local [working copy] changed file1 which other [destination] deleted | 955 file file1 was deleted in local [working copy] but was modified in other [destination]. |
956 What do you want to do? | |
931 use (c)hanged version, (d)elete, or leave (u)nresolved? | 957 use (c)hanged version, (d)elete, or leave (u)nresolved? |
932 other [destination] changed file2 which local [working copy] deleted | 958 file file2 was deleted in other [destination] but was modified in local [working copy]. |
959 What do you want to do? | |
933 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | 960 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
934 1 files updated, 0 files merged, 0 files removed, 2 files unresolved | 961 1 files updated, 0 files merged, 0 files removed, 2 files unresolved |
935 use 'hg resolve' to retry unresolved file merges | 962 use 'hg resolve' to retry unresolved file merges |
936 [1] | 963 [1] |
937 $ status 2>&1 | tee $TESTTMP/prompt.status | 964 $ status 2>&1 | tee $TESTTMP/prompt.status |
975 $ hg co -C 0 | 1002 $ hg co -C 0 |
976 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1003 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
977 $ echo changed >> file1 | 1004 $ echo changed >> file1 |
978 $ hg rm file2 | 1005 $ hg rm file2 |
979 $ hg update 1 --tool :merge3 | 1006 $ hg update 1 --tool :merge3 |
980 local [working copy] changed file1 which other [destination] deleted | 1007 file file1 was deleted in local [working copy] but was modified in other [destination]. |
1008 What do you want to do? | |
981 use (c)hanged version, (d)elete, or leave (u)nresolved? u | 1009 use (c)hanged version, (d)elete, or leave (u)nresolved? u |
982 other [destination] changed file2 which local [working copy] deleted | 1010 file file2 was deleted in other [destination] but was modified in local [working copy]. |
1011 What do you want to do? | |
983 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | 1012 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u |
984 1 files updated, 0 files merged, 0 files removed, 2 files unresolved | 1013 1 files updated, 0 files merged, 0 files removed, 2 files unresolved |
985 use 'hg resolve' to retry unresolved file merges | 1014 use 'hg resolve' to retry unresolved file merges |
986 [1] | 1015 [1] |
987 $ status | 1016 $ status |
1031 (no more unresolved files) | 1060 (no more unresolved files) |
1032 --- diff of status --- | 1061 --- diff of status --- |
1033 (status identical) | 1062 (status identical) |
1034 | 1063 |
1035 === :other -> :prompt === | 1064 === :other -> :prompt === |
1036 local [working copy] changed file1 which other [destination] deleted | 1065 file file1 was deleted in local [working copy] but was modified in other [destination]. |
1066 What do you want to do? | |
1037 use (c)hanged version, (d)elete, or leave (u)nresolved? | 1067 use (c)hanged version, (d)elete, or leave (u)nresolved? |
1038 other [destination] changed file2 which local [working copy] deleted | 1068 file file2 was deleted in other [destination] but was modified in local [working copy]. |
1069 What do you want to do? | |
1039 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | 1070 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
1040 --- diff of status --- | 1071 --- diff of status --- |
1041 (status identical) | 1072 (status identical) |
1042 | 1073 |
1043 === :prompt -> :local === | 1074 === :prompt -> :local === |
1058 (no more unresolved files) | 1089 (no more unresolved files) |
1059 --- diff of status --- | 1090 --- diff of status --- |
1060 (status identical) | 1091 (status identical) |
1061 | 1092 |
1062 === :local -> :prompt === | 1093 === :local -> :prompt === |
1063 local [working copy] changed file1 which other [destination] deleted | 1094 file file1 was deleted in local [working copy] but was modified in other [destination]. |
1095 What do you want to do? | |
1064 use (c)hanged version, (d)elete, or leave (u)nresolved? | 1096 use (c)hanged version, (d)elete, or leave (u)nresolved? |
1065 other [destination] changed file2 which local [working copy] deleted | 1097 file file2 was deleted in other [destination] but was modified in local [working copy]. |
1098 What do you want to do? | |
1066 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | 1099 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
1067 --- diff of status --- | 1100 --- diff of status --- |
1068 (status identical) | 1101 (status identical) |
1069 | 1102 |
1070 === :prompt -> :other === | 1103 === :prompt -> :other === |
1075 === :other -> :fail === | 1108 === :other -> :fail === |
1076 --- diff of status --- | 1109 --- diff of status --- |
1077 (status identical) | 1110 (status identical) |
1078 | 1111 |
1079 === :fail -> :prompt === | 1112 === :fail -> :prompt === |
1080 local [working copy] changed file1 which other [destination] deleted | 1113 file file1 was deleted in local [working copy] but was modified in other [destination]. |
1114 What do you want to do? | |
1081 use (c)hanged version, (d)elete, or leave (u)nresolved? | 1115 use (c)hanged version, (d)elete, or leave (u)nresolved? |
1082 other [destination] changed file2 which local [working copy] deleted | 1116 file file2 was deleted in other [destination] but was modified in local [working copy]. |
1117 What do you want to do? | |
1083 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? | 1118 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? |
1084 --- diff of status --- | 1119 --- diff of status --- |
1085 (status identical) | 1120 (status identical) |
1086 | 1121 |
1087 === :prompt -> :fail === | 1122 === :prompt -> :fail === |