Mercurial > hg
changeset 27163:27b89a0957ec
filemerge: add a 'leave unresolved' option to change/delete prompts
We're going to make this option the default in an upcoming patch.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 30 Nov 2015 13:43:55 -0800 |
parents | 4ab69be0ea15 |
children | 88d5db4b155c |
files | mercurial/filemerge.py tests/test-commit-amend.t tests/test-copy-move-merge.t tests/test-largefiles-update.t tests/test-merge-changedelete.t tests/test-merge-force.t tests/test-merge-remove.t tests/test-rebase-newancestor.t tests/test-rename-merge2.t |
diffstat | 9 files changed, 100 insertions(+), 99 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/filemerge.py Mon Nov 30 11:17:18 2015 -0800 +++ b/mercurial/filemerge.py Mon Nov 30 13:43:55 2015 -0800 @@ -239,15 +239,16 @@ if fco.isabsent(): index = ui.promptchoice( _("local changed %s which remote deleted\n" - "use (c)hanged version or (d)elete?" - "$$ &Changed $$ &Delete") % fd, 0) - choice = ['local', 'other'][index] + "use (c)hanged version, (d)elete, or leave (u)nresolved?" + "$$ &Changed $$ &Delete $$ &Unresolved") % fd, 0) + choice = ['local', 'other', 'unresolved'][index] elif fcd.isabsent(): index = ui.promptchoice( _("remote changed %s which local deleted\n" - "use (c)hanged version or leave (d)eleted?" - "$$ &Changed $$ &Deleted") % fd, 0) - choice = ['other', 'local'][index] + "use (c)hanged version, leave (d)eleted, or " + "leave (u)nresolved?" + "$$ &Changed $$ &Deleted $$ &Unresolved") % fd, 0) + choice = ['other', 'local', 'unresolved'][index] else: index = ui.promptchoice( _("no tool found to merge %s\n"
--- a/tests/test-commit-amend.t Mon Nov 30 11:17:18 2015 -0800 +++ b/tests/test-commit-amend.t Mon Nov 30 13:43:55 2015 -0800 @@ -812,7 +812,7 @@ $ hg ci -m aa $ hg merge -q bar local changed aa which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c $ hg ci -m 'merge bar (with conflicts)' $ hg log --config diff.git=1 -pr . changeset: 33:97a298b0c59f
--- a/tests/test-copy-move-merge.t Mon Nov 30 11:17:18 2015 -0800 +++ b/tests/test-copy-move-merge.t Mon Nov 30 13:43:55 2015 -0800 @@ -83,7 +83,7 @@ $ hg rebase --keep -d 1 -b 2 --config extensions.rebase= --config experimental.disablecopytrace=True rebasing 2:add3f11052fa "other" (tip) remote changed a which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c $ cat b 1
--- a/tests/test-largefiles-update.t Mon Nov 30 11:17:18 2015 -0800 +++ b/tests/test-largefiles-update.t Mon Nov 30 13:43:55 2015 -0800 @@ -596,7 +596,7 @@ rebasing 1:72518492caa6 "#1" rebasing 4:07d6153b5c04 "#4" local changed .hglf/large1 which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c $ hg diff -c "tip~1" --nodates .hglf/large1 | grep '^[+-][0-9a-z]' -e5bb990443d6a92aaf7223813720f7566c9dd05b
--- a/tests/test-merge-changedelete.t Mon Nov 30 11:17:18 2015 -0800 +++ b/tests/test-merge-changedelete.t Mon Nov 30 13:43:55 2015 -0800 @@ -55,9 +55,9 @@ $ hg merge -y local changed file1 which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging file3 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') 0 files updated, 2 files merged, 0 files removed, 1 files unresolved @@ -114,9 +114,9 @@ > d > EOF local changed file1 which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? d + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? d merging file3 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') 0 files updated, 2 files merged, 0 files removed, 1 files unresolved @@ -174,18 +174,18 @@ > c > EOF local changed file1 which remote deleted - use (c)hanged version or (d)elete? foo + use (c)hanged version, (d)elete, or leave (u)nresolved? foo unrecognized response local changed file1 which remote deleted - use (c)hanged version or (d)elete? bar + use (c)hanged version, (d)elete, or leave (u)nresolved? bar unrecognized response local changed file1 which remote deleted - use (c)hanged version or (d)elete? d + use (c)hanged version, (d)elete, or leave (u)nresolved? d remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? baz + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? baz unrecognized response remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging file3 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') 0 files updated, 1 files merged, 1 files removed, 1 files unresolved @@ -239,9 +239,9 @@ > d > EOF local changed file1 which remote deleted - use (c)hanged version or (d)elete? d + use (c)hanged version, (d)elete, or leave (u)nresolved? d remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? merging file3 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') 0 files updated, 0 files merged, 1 files removed, 2 files unresolved @@ -418,9 +418,9 @@ $ hg merge --config ui.interactive=True --tool :prompt local changed file1 which remote deleted - use (c)hanged version or (d)elete? + use (c)hanged version, (d)elete, or leave (u)nresolved? remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? no tool found to merge file3 keep (l)ocal, take (o)ther, or leave (u)nresolved? 0 files updated, 0 files merged, 0 files removed, 3 files unresolved @@ -470,9 +470,9 @@ $ hg merge --tool :prompt local changed file1 which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c no tool found to merge file3 keep (l)ocal, take (o)ther, or leave (u)nresolved? l 0 files updated, 3 files merged, 0 files removed, 0 files unresolved @@ -519,9 +519,9 @@ $ hg merge --tool :merge3 local changed file1 which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging file3 warning: conflicts while merging file3! (edit, then use 'hg resolve --mark') 0 files updated, 2 files merged, 0 files removed, 1 files unresolved @@ -603,9 +603,9 @@ === :other -> :prompt === local changed file1 which remote deleted - use (c)hanged version or (d)elete? + use (c)hanged version, (d)elete, or leave (u)nresolved? remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? no tool found to merge file3 keep (l)ocal, take (o)ther, or leave (u)nresolved? --- diff of status --- @@ -632,9 +632,9 @@ === :local -> :prompt === local changed file1 which remote deleted - use (c)hanged version or (d)elete? + use (c)hanged version, (d)elete, or leave (u)nresolved? remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? no tool found to merge file3 keep (l)ocal, take (o)ther, or leave (u)nresolved? --- diff of status --- @@ -651,9 +651,9 @@ === :fail -> :prompt === local changed file1 which remote deleted - use (c)hanged version or (d)elete? + use (c)hanged version, (d)elete, or leave (u)nresolved? remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? no tool found to merge file3 keep (l)ocal, take (o)ther, or leave (u)nresolved? --- diff of status --- @@ -678,9 +678,9 @@ $ hg rm file2 $ hg update 1 -y local changed file1 which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c 1 files updated, 2 files merged, 0 files removed, 0 files unresolved $ status --- status --- @@ -832,9 +832,9 @@ $ hg rm file2 $ hg update 1 --config ui.interactive=True --tool :prompt local changed file1 which remote deleted - use (c)hanged version or (d)elete? + use (c)hanged version, (d)elete, or leave (u)nresolved? remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 1 files updated, 0 files merged, 0 files removed, 2 files unresolved use 'hg resolve' to retry unresolved file merges [1] @@ -877,9 +877,9 @@ $ hg rm file2 $ hg update 1 --tool :merge3 local changed file1 which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c 1 files updated, 2 files merged, 0 files removed, 0 files unresolved $ status --- status --- @@ -926,9 +926,9 @@ === :other -> :prompt === local changed file1 which remote deleted - use (c)hanged version or (d)elete? + use (c)hanged version, (d)elete, or leave (u)nresolved? remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? --- diff of status --- (status identical) @@ -953,9 +953,9 @@ === :local -> :prompt === local changed file1 which remote deleted - use (c)hanged version or (d)elete? + use (c)hanged version, (d)elete, or leave (u)nresolved? remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? --- diff of status --- (status identical) @@ -970,9 +970,9 @@ === :fail -> :prompt === local changed file1 which remote deleted - use (c)hanged version or (d)elete? + use (c)hanged version, (d)elete, or leave (u)nresolved? remote changed file2 which local deleted - use (c)hanged version or leave (d)eleted? + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? --- diff of status --- (status identical)
--- a/tests/test-merge-force.t Mon Nov 30 11:17:18 2015 -0800 +++ b/tests/test-merge-force.t Mon Nov 30 13:43:55 2015 -0800 @@ -143,55 +143,55 @@ $ hg merge -f --tool internal:merge3 'desc("remote")' local changed content1_missing_content1_content4-tracked which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c local changed content1_missing_content3_content3-tracked which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c local changed content1_missing_content3_content4-tracked which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c local changed content1_missing_missing_content4-tracked which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c remote changed content1_content2_content1_content1-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content1_content2-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content1_content4-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content1_missing-tracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content1_missing-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content2_content1-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content2_content2-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content2_content4-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content2_missing-tracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content2_missing-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content3_content1-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content3_content2-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content3_content3-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content3_content4-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content3_missing-tracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content3_missing-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_missing_content1-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_missing_content2-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_missing_content4-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_missing_missing-tracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_missing_missing-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging content1_content2_content1_content4-tracked merging content1_content2_content2_content1-tracked merging content1_content2_content2_content4-tracked @@ -705,63 +705,63 @@ $ hg resolve --unmark --all $ hg resolve --all --tool internal:merge3 remote changed content1_content2_content1_content1-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content1_content2-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging content1_content2_content1_content4-tracked remote changed content1_content2_content1_content4-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content1_missing-tracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content1_missing-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging content1_content2_content2_content1-tracked remote changed content1_content2_content2_content1-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content2_content2-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging content1_content2_content2_content4-tracked remote changed content1_content2_content2_content4-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content2_missing-tracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content2_missing-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging content1_content2_content3_content1-tracked remote changed content1_content2_content3_content1-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content3_content2-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging content1_content2_content3_content3-tracked remote changed content1_content2_content3_content3-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging content1_content2_content3_content4-tracked remote changed content1_content2_content3_content4-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content3_missing-tracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_content3_missing-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging content1_content2_missing_content1-tracked remote changed content1_content2_missing_content1-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_missing_content2-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging content1_content2_missing_content4-tracked remote changed content1_content2_missing_content4-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_missing_missing-tracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c remote changed content1_content2_missing_missing-untracked which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c local changed content1_missing_content1_content4-tracked which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c local changed content1_missing_content3_content3-tracked which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c local changed content1_missing_content3_content4-tracked which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c local changed content1_missing_missing_content4-tracked which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c merging missing_content2_content2_content4-tracked merging missing_content2_content3_content3-tracked merging missing_content2_content3_content4-tracked
--- a/tests/test-merge-remove.t Mon Nov 30 11:17:18 2015 -0800 +++ b/tests/test-merge-remove.t Mon Nov 30 13:43:55 2015 -0800 @@ -103,7 +103,7 @@ $ hg merge -f remote changed bar which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c merging foo1 and foo to foo1 0 files updated, 2 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit)
--- a/tests/test-rebase-newancestor.t Mon Nov 30 11:17:18 2015 -0800 +++ b/tests/test-rebase-newancestor.t Mon Nov 30 13:43:55 2015 -0800 @@ -134,7 +134,7 @@ rebasing 2:ec2c14fb2984 "dev: f-dev stuff" rebasing 4:4b019212aaf6 "dev: merge default" remote changed f-default which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c rebasing 6:9455ee510502 "dev: merge default" saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-43e9e04b-backup.hg (glob) $ hg tglog @@ -161,7 +161,7 @@ rebasing 2:ec2c14fb2984 "dev: f-dev stuff" rebasing 4:4b019212aaf6 "dev: merge default" remote changed f-default which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c rebasing 6:9455ee510502 "dev: merge default" saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-62d0b222-backup.hg (glob) $ hg tglog
--- a/tests/test-rename-merge2.t Mon Nov 30 11:17:18 2015 -0800 +++ b/tests/test-rename-merge2.t Mon Nov 30 13:43:55 2015 -0800 @@ -684,7 +684,7 @@ a: prompt deleted/changed -> m (premerge) picked tool ':prompt' for a (binary False symlink False changedelete True) remote changed a which local deleted - use (c)hanged version or leave (d)eleted? c + use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c b: both created -> m (premerge) picked tool 'python ../merge' for b (binary False symlink False changedelete False) merging b @@ -727,7 +727,7 @@ a: prompt changed/deleted -> m (premerge) picked tool ':prompt' for a (binary False symlink False changedelete True) local changed a which remote deleted - use (c)hanged version or (d)elete? c + use (c)hanged version, (d)elete, or leave (u)nresolved? c b: both created -> m (premerge) picked tool 'python ../merge' for b (binary False symlink False changedelete False) merging b