Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
27161:296d55def9c4 | 27162:4ab69be0ea15 |
---|---|
247 _("remote changed %s which local deleted\n" | 247 _("remote changed %s which local deleted\n" |
248 "use (c)hanged version or leave (d)eleted?" | 248 "use (c)hanged version or leave (d)eleted?" |
249 "$$ &Changed $$ &Deleted") % fd, 0) | 249 "$$ &Changed $$ &Deleted") % fd, 0) |
250 choice = ['other', 'local'][index] | 250 choice = ['other', 'local'][index] |
251 else: | 251 else: |
252 index = ui.promptchoice(_("no tool found to merge %s\n" | 252 index = ui.promptchoice( |
253 "keep (l)ocal or take (o)ther?" | 253 _("no tool found to merge %s\n" |
254 "$$ &Local $$ &Other") % fd, 0) | 254 "keep (l)ocal, take (o)ther, or leave (u)nresolved?" |
255 choice = ['local', 'other'][index] | 255 "$$ &Local $$ &Other $$ &Unresolved") % fd, 0) |
256 choice = ['local', 'other', 'unresolved'][index] | |
256 | 257 |
257 if choice == 'other': | 258 if choice == 'other': |
258 return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) | 259 return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) |
259 else: | 260 elif choice == 'local': |
260 return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) | 261 return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) |
262 elif choice == 'unresolved': | |
263 return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf) | |
261 except error.ResponseExpected: | 264 except error.ResponseExpected: |
262 ui.write("\n") | 265 ui.write("\n") |
263 return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf) | 266 return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf) |
264 | 267 |
265 @internaltool('local', nomerge) | 268 @internaltool('local', nomerge) |