示例#1
0
 def check(tool, pat, symlink, binary):
     tmsg = tool
     if pat:
         tmsg += " specified for " + pat
     if pat and not _findtool(ui, tool): # skip search if not matching
         ui.warn(_("couldn't find merge tool %s\n") % tmsg)
     elif symlink and not _toolbool(ui, tool, "symlink"):
         ui.warn(_("tool %s can't handle symlinks\n") % tmsg)
     elif binary and not _toolbool(ui, tool, "binary"):
         ui.warn(_("tool %s can't handle binary\n") % tmsg)
     elif not util.gui() and _toolbool(ui, tool, "gui"):
         ui.warn(_("tool %s requires a GUI\n") % tmsg)
     else:
         return True
     return False
示例#2
0
 def check(tool, pat, symlink, binary):
     tmsg = tool
     if pat:
         tmsg += " specified for " + pat
     if not _findtool(ui, tool):
         if pat: # explicitly requested tool deserves a warning
             ui.warn(_("couldn't find merge tool %s\n") % tmsg)
         else: # configured but non-existing tools are more silent
             ui.note(_("couldn't find merge tool %s\n") % tmsg)
     elif symlink and not _toolbool(ui, tool, "symlink"):
         ui.warn(_("tool %s can't handle symlinks\n") % tmsg)
     elif binary and not _toolbool(ui, tool, "binary"):
         ui.warn(_("tool %s can't handle binary\n") % tmsg)
     elif not util.gui() and _toolbool(ui, tool, "gui"):
         ui.warn(_("tool %s requires a GUI\n") % tmsg)
     else:
         return True
     return False
示例#3
0
 def check(tool, pat, symlink, binary):
     tmsg = tool
     if pat:
         tmsg += " specified for " + pat
     if not _findtool(ui, tool):
         if pat:  # explicitly requested tool deserves a warning
             ui.warn(_("couldn't find merge tool %s\n") % tmsg)
         else:  # configured but non-existing tools are more silent
             ui.note(_("couldn't find merge tool %s\n") % tmsg)
     elif symlink and not _toolbool(ui, tool, "symlink"):
         ui.warn(_("tool %s can't handle symlinks\n") % tmsg)
     elif binary and not _toolbool(ui, tool, "binary"):
         ui.warn(_("tool %s can't handle binary\n") % tmsg)
     elif not util.gui() and _toolbool(ui, tool, "gui"):
         ui.warn(_("tool %s requires a GUI\n") % tmsg)
     else:
         return True
     return False