Mercurial > hg
changeset 26851:859f453e8b4e
filemerge.prompt: separate out choice selection and action
This will make future patches cleaner.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 02 Nov 2015 12:12:24 -0800 |
parents | 00209e38e7d9 |
children | f9984f76fd90 |
files | mercurial/filemerge.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/filemerge.py Mon Nov 02 12:25:15 2015 -0800 +++ b/mercurial/filemerge.py Mon Nov 02 12:12:24 2015 -0800 @@ -175,9 +175,12 @@ ui = repo.ui fd = fcd.path() - if ui.promptchoice(_(" no tool found to merge %s\n" - "keep (l)ocal or take (o)ther?" - "$$ &Local $$ &Other") % fd, 0): + 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] + + if choice == 'other': return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) else: return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf)