# HG changeset patch # User Siddharth Agarwal # Date 1447487546 28800 # Node ID 58a4eb16e7221831ef582f2f76aca19fa86a4186 # Parent a8908c139f2fff634e37fabb15536d63237fb0d1 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. diff -r a8908c139f2f -r 58a4eb16e722 mercurial/filemerge.py --- a/mercurial/filemerge.py Wed Nov 18 15:41:50 2015 -0800 +++ b/mercurial/filemerge.py Fri Nov 13 23:52:26 2015 -0800 @@ -221,10 +221,23 @@ fd = fcd.path() try: - 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 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] + 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] + 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] if choice == 'other': return _iother(repo, mynode, orig, fcd, fco, fca, toolconf)