Mercurial > public > mercurial-scm > hg
comparison mercurial/filemerge.py @ 27038:58a4eb16e722
filemerge: add support for change/delete conflicts to the ':prompt' tool
We haven't added the 'leave unresolved' option yet -- that will come in a
future patch.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Fri, 13 Nov 2015 23:52:26 -0800 |
parents | a8908c139f2f |
children | d7517deedf86 |
comparison
equal
deleted
inserted
replaced
27037:a8908c139f2f | 27038:58a4eb16e722 |
---|---|
219 the merged version.""" | 219 the merged version.""" |
220 ui = repo.ui | 220 ui = repo.ui |
221 fd = fcd.path() | 221 fd = fcd.path() |
222 | 222 |
223 try: | 223 try: |
224 index = ui.promptchoice(_("no tool found to merge %s\n" | 224 if fco.isabsent(): |
225 "keep (l)ocal or take (o)ther?" | 225 index = ui.promptchoice( |
226 "$$ &Local $$ &Other") % fd, 0) | 226 _("local changed %s which remote deleted\n" |
227 choice = ['local', 'other'][index] | 227 "use (c)hanged version or (d)elete?" |
228 "$$ &Changed $$ &Delete") % fd, 0) | |
229 choice = ['local', 'other'][index] | |
230 elif fcd.isabsent(): | |
231 index = ui.promptchoice( | |
232 _("remote changed %s which local deleted\n" | |
233 "use (c)hanged version or leave (d)eleted?" | |
234 "$$ &Changed $$ &Deleted") % fd, 0) | |
235 choice = ['other', 'local'][index] | |
236 else: | |
237 index = ui.promptchoice(_("no tool found to merge %s\n" | |
238 "keep (l)ocal or take (o)ther?" | |
239 "$$ &Local $$ &Other") % fd, 0) | |
240 choice = ['local', 'other'][index] | |
228 | 241 |
229 if choice == 'other': | 242 if choice == 'other': |
230 return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) | 243 return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) |
231 else: | 244 else: |
232 return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) | 245 return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) |