# HG changeset patch # User David Champion # Date 2010-05-10 16:04:56 # Node ID d3c1eddfdbcfeddc281a405bdfc3de91dbebf7a4 # Parent a912f26777d3b8c4186604ec71cc8fff3184337d merge: tool.check = prompt will force an interactive merge check tool.check = prompt can be used when the exit status of a merge tool is unreliable but an explicit user signoff on the merge result is acceptable. diff --git a/doc/hgrc.5.txt b/doc/hgrc.5.txt --- a/doc/hgrc.5.txt +++ b/doc/hgrc.5.txt @@ -470,6 +470,8 @@ Supported arguments: Ask whether merge was successful when the merged file shows no changes. ``conflicts`` Check whether there are conflicts even though the tool reported success. + ``prompt`` + Always prompt for merge success, regardless of success reported by tool. ``checkchanged`` True is equivalent to ``check = changed``. diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -231,8 +231,15 @@ def filemerge(repo, mynode, orig, fcd, f if re.match("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcd.data()): r = 1 - if not r and (_toolbool(ui, tool, "checkchanged") or - 'changed' in _toollist(ui, tool, "check")): + checked = False + if 'prompt' in _toollist(ui, tool, "check"): + checked = True + if ui.promptchoice(_("was merge of '%s' successful (yn)?") % fd, + (_("&Yes"), _("&No")), 1): + r = 1 + + if not r and not checked and (_toolbool(ui, tool, "checkchanged") or + 'changed' in _toollist(ui, tool, "check")): if filecmp.cmp(repo.wjoin(fd), back): if ui.promptchoice(_(" output file %s appears unchanged\n" "was merge successful (yn)?") % fd,