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,