Mercurial > hg
diff mercurial/filemerge.py @ 27162:4ab69be0ea15
filemerge: add a 'leave unresolved' option to regular prompts
'Regular' here means anything that isn't a change/delete prompt. We'll add this
option to change/delete prompts in a subsequent patch.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 30 Nov 2015 11:17:18 -0800 |
parents | 296d55def9c4 |
children | 27b89a0957ec |
line wrap: on
line diff
--- a/mercurial/filemerge.py Wed Nov 25 14:25:26 2015 -0800 +++ b/mercurial/filemerge.py Mon Nov 30 11:17:18 2015 -0800 @@ -249,15 +249,18 @@ "$$ &Changed $$ &Deleted") % fd, 0) choice = ['other', 'local'][index] else: - index = ui.promptchoice(_("no tool found to merge %s\n" - "keep (l)ocal or take (o)ther?" - "$$ &Local $$ &Other") % fd, 0) - choice = ['local', 'other'][index] + index = ui.promptchoice( + _("no tool found to merge %s\n" + "keep (l)ocal, take (o)ther, or leave (u)nresolved?" + "$$ &Local $$ &Other $$ &Unresolved") % fd, 0) + choice = ['local', 'other', 'unresolved'][index] if choice == 'other': return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) - else: + elif choice == 'local': return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) + elif choice == 'unresolved': + return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf) except error.ResponseExpected: ui.write("\n") return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf)