--- a/mercurial/filemerge.py Tue Aug 14 20:15:51 2018 +0900
+++ b/mercurial/filemerge.py Wed Aug 15 22:24:38 2018 +0900
@@ -195,6 +195,12 @@
for pat, tool in ui.configitems("merge-patterns"):
mf = match.match(repo.root, '', [pat])
if mf(path) and check(tool, pat, symlink, False, changedelete):
+ if binary and not hascapability(tool, "binary", strict=True):
+ ui.warn(_("warning: check merge-patterns configurations,"
+ " if %r for binary file %r is unintentional\n"
+ "(see 'hg help merge-tools'"
+ " for binary files capability)\n")
+ % (pycompat.bytestr(tool), pycompat.bytestr(path)))
toolpath = _findtool(ui, tool)
return (tool, _quotetoolpath(toolpath))