##// END OF EJS Templates
filemerge: add internal:prompt target
Matt Mackall -
r8830:a9850eda default
parent child Browse files
Show More
@@ -16,8 +16,10 b' def _toolstr(ui, tool, part, default="")'
16 def _toolbool(ui, tool, part, default=False):
16 def _toolbool(ui, tool, part, default=False):
17 return ui.configbool("merge-tools", tool + "." + part, default)
17 return ui.configbool("merge-tools", tool + "." + part, default)
18
18
19 _internal = ['internal:' + s for s in 'fail local other merge prompt'.split()]
20
19 def _findtool(ui, tool):
21 def _findtool(ui, tool):
20 if tool in ("internal:fail", "internal:local", "internal:other"):
22 if tool in _internal:
21 return tool
23 return tool
22 k = _toolstr(ui, tool, "regkey")
24 k = _toolstr(ui, tool, "regkey")
23 if k:
25 if k:
@@ -140,7 +142,7 b' def filemerge(repo, mynode, orig, fcd, f'
140 ui.debug(_("picked tool '%s' for %s (binary %s symlink %s)\n") %
142 ui.debug(_("picked tool '%s' for %s (binary %s symlink %s)\n") %
141 (tool, fd, binary, symlink))
143 (tool, fd, binary, symlink))
142
144
143 if not tool:
145 if not tool or tool == 'internal:prompt':
144 tool = "internal:local"
146 tool = "internal:local"
145 if ui.prompt(_(" no tool found to merge %s\n"
147 if ui.prompt(_(" no tool found to merge %s\n"
146 "keep (l)ocal or take (o)ther?") % fd,
148 "keep (l)ocal or take (o)ther?") % fd,
General Comments 0
You need to be logged in to leave comments. Login now