comparison mercurial/filemerge.py @ 38952:0e58c5b20745

mergetool: warn if ui.merge points to nonexistent tool This adds a warning when ui.merge is configured but points to an executable that doesn't exist. It gets printed once per fail, but that seems to be how our other warnings about merge tools are reported. Differential Revision: https://phab.mercurial-scm.org/D3975
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 23 Jul 2018 22:51:53 -0700
parents 6c8e3c847977
children 5d3b58472660
comparison
equal deleted inserted replaced
38951:6bfd1054d867 38952:0e58c5b20745
206 if tool not in disabled]) 206 if tool not in disabled])
207 uimerge = ui.config("ui", "merge") 207 uimerge = ui.config("ui", "merge")
208 if uimerge: 208 if uimerge:
209 # external tools defined in uimerge won't be able to handle 209 # external tools defined in uimerge won't be able to handle
210 # change/delete conflicts 210 # change/delete conflicts
211 if uimerge not in names and not changedelete: 211 if check(uimerge, path, symlink, binary, changedelete):
212 return (uimerge, uimerge) 212 if uimerge not in names and not changedelete:
213 tools.insert(0, (None, uimerge)) # highest priority 213 return (uimerge, uimerge)
214 tools.insert(0, (None, uimerge)) # highest priority
214 tools.append((None, "hgmerge")) # the old default, if found 215 tools.append((None, "hgmerge")) # the old default, if found
215 for p, t in tools: 216 for p, t in tools:
216 if check(t, None, symlink, binary, changedelete): 217 if check(t, None, symlink, binary, changedelete):
217 toolpath = _findtool(ui, t) 218 toolpath = _findtool(ui, t)
218 return (t, _quotetoolpath(toolpath)) 219 return (t, _quotetoolpath(toolpath))