--- a/hgext/convert/common.py Thu Mar 20 22:58:53 2008 +0100
+++ b/hgext/convert/common.py Thu Mar 20 23:32:43 2008 +0100
@@ -18,10 +18,13 @@
s = base64.decodestring(s)
return pickle.loads(s)
-def checktool(exe, name=None):
+class MissingTool(Exception): pass
+
+def checktool(exe, name=None, abort=True):
name = name or exe
if not util.find_exe(exe):
- raise util.Abort('cannot find required "%s" tool' % name)
+ exc = abort and util.Abort or MissingTool
+ raise exc(_('cannot find required "%s" tool') % name)
class NoRepo(Exception): pass