Show More
@@ -137,6 +137,12 def findexternaltool(ui, tool): | |||||
137 | return procutil.findexe(util.expandpath(exe)) |
|
137 | return procutil.findexe(util.expandpath(exe)) | |
138 |
|
138 | |||
139 | def _picktool(repo, ui, path, binary, symlink, changedelete): |
|
139 | def _picktool(repo, ui, path, binary, symlink, changedelete): | |
|
140 | def hascapability(tool, capability, strict=False): | |||
|
141 | if strict and tool in internals: | |||
|
142 | if internals[tool].capabilities.get(capability): | |||
|
143 | return True | |||
|
144 | return _toolbool(ui, tool, capability) | |||
|
145 | ||||
140 | def supportscd(tool): |
|
146 | def supportscd(tool): | |
141 | return tool in internals and internals[tool].mergetype == nomerge |
|
147 | return tool in internals and internals[tool].mergetype == nomerge | |
142 |
|
148 | |||
@@ -149,9 +155,9 def _picktool(repo, ui, path, binary, sy | |||||
149 | ui.warn(_("couldn't find merge tool %s\n") % tmsg) |
|
155 | ui.warn(_("couldn't find merge tool %s\n") % tmsg) | |
150 | else: # configured but non-existing tools are more silent |
|
156 | else: # configured but non-existing tools are more silent | |
151 | ui.note(_("couldn't find merge tool %s\n") % tmsg) |
|
157 | ui.note(_("couldn't find merge tool %s\n") % tmsg) | |
152 |
elif symlink and not |
|
158 | elif symlink and not hascapability(tool, "symlink"): | |
153 | ui.warn(_("tool %s can't handle symlinks\n") % tmsg) |
|
159 | ui.warn(_("tool %s can't handle symlinks\n") % tmsg) | |
154 |
elif binary and not |
|
160 | elif binary and not hascapability(tool, "binary"): | |
155 | ui.warn(_("tool %s can't handle binary\n") % tmsg) |
|
161 | ui.warn(_("tool %s can't handle binary\n") % tmsg) | |
156 | elif changedelete and not supportscd(tool): |
|
162 | elif changedelete and not supportscd(tool): | |
157 | # the nomerge tools are the only tools that support change/delete |
|
163 | # the nomerge tools are the only tools that support change/delete |
General Comments 0
You need to be logged in to leave comments.
Login now