changeset 8830:a9850eda2973

filemerge: add internal:prompt target
author Matt Mackall <mpm@selenic.com>
date Thu, 18 Jun 2009 16:56:02 -0500
parents ce4b92f5cea7
children 91e26fb24fb1
files mercurial/filemerge.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filemerge.py	Thu Jun 18 10:39:04 2009 +0100
+++ b/mercurial/filemerge.py	Thu Jun 18 16:56:02 2009 -0500
@@ -16,8 +16,10 @@
 def _toolbool(ui, tool, part, default=False):
     return ui.configbool("merge-tools", tool + "." + part, default)
 
+_internal = ['internal:' + s for s in 'fail local other merge prompt'.split()]
+
 def _findtool(ui, tool):
-    if tool in ("internal:fail", "internal:local", "internal:other"):
+    if tool in _internal:
         return tool
     k = _toolstr(ui, tool, "regkey")
     if k:
@@ -140,7 +142,7 @@
     ui.debug(_("picked tool '%s' for %s (binary %s symlink %s)\n") %
                (tool, fd, binary, symlink))
 
-    if not tool:
+    if not tool or tool == 'internal:prompt':
         tool = "internal:local"
         if ui.prompt(_(" no tool found to merge %s\n"
                        "keep (l)ocal or take (o)ther?") % fd,