Mercurial > public > mercurial-scm > hg-stable
diff mercurial/filemerge.py @ 32293:7d4ce4b567c5
filemerge: show warning about choice of :prompt only at an actual fallback
Before this patch, internal merge tool :prompt shows "no tool found to
merge FILE" line, even if :prompt is explicitly specified as a tool to
be used.
This patch shows warning message about choice of :prompt only at an
actual fallback, in which case any tool is rejected by capability for
binary or symlink.
It is for backward compatibility to omit warning message in
"changedelete" case.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 13 May 2017 03:28:36 +0900 |
parents | 458f7294dfee |
children | 177742666abd |
line wrap: on
line diff
--- a/mercurial/filemerge.py Tue May 09 13:56:46 2017 -0700 +++ b/mercurial/filemerge.py Sat May 13 03:28:36 2017 +0900 @@ -209,6 +209,9 @@ # internal merge or prompt as last resort if symlink or binary or changedelete: + if not changedelete and len(tools): + # any tool is rejected by capability for symlink or binary + ui.warn(_("no tool found to merge %s\n") % path) return ":prompt", None return ":merge", None @@ -260,8 +263,8 @@ choice = ['other', 'local', 'unresolved'][index] else: index = ui.promptchoice( - _("no tool found to merge %(fd)s\n" - "keep (l)ocal%(l)s, take (o)ther%(o)s, or leave (u)nresolved?" + _("keep (l)ocal%(l)s, take (o)ther%(o)s, or leave (u)nresolved" + " for %(fd)s?" "$$ &Local $$ &Other $$ &Unresolved") % prompts, 2) choice = ['local', 'other', 'unresolved'][index]