--- a/hgext/convert/common.py Sun Oct 28 09:47:54 2007 +0100
+++ b/hgext/convert/common.py Tue Oct 30 22:14:15 2007 +0100
@@ -1,6 +1,7 @@
# common code for the convert extension
import base64
import cPickle as pickle
+from mercurial import util
def encodeargs(args):
def encodearg(s):
@@ -15,6 +16,11 @@
s = base64.decodestring(s)
return pickle.loads(s)
+def checktool(exe, name=None):
+ name = name or exe
+ if not util.find_exe(exe):
+ raise util.Abort('cannot find required "%s" tool' % name)
+
class NoRepo(Exception): pass
SKIPREV = 'SKIP'