comparison hgext/convert/darcs.py @ 9242:6fd3f795e908

issue1251: bail if darcs version is too old
author Bryan O'Sullivan <bos@serpentine.com>
date Sat, 25 Jul 2009 10:08:20 -0700
parents 1b60efdb8bc5
children 4c041f1ee1b4 457a30ed8ffb
comparison
equal deleted inserted replaced
9240:b6cb3af61582 9242:6fd3f795e908
34 34
35 if not os.path.exists(os.path.join(path, '_darcs')): 35 if not os.path.exists(os.path.join(path, '_darcs')):
36 raise NoRepo("%s does not look like a darcs repo" % path) 36 raise NoRepo("%s does not look like a darcs repo" % path)
37 37
38 checktool('darcs') 38 checktool('darcs')
39 version = self.run0('--version').splitlines()[0].strip()
40 if version < '2.1':
41 raise util.Abort(_('darcs version 2.1 or newer needed (found %r)') %
42 version)
39 43
40 if ElementTree is None: 44 if ElementTree is None:
41 raise util.Abort(_("Python ElementTree module is not available")) 45 raise util.Abort(_("Python ElementTree module is not available"))
42 46
43 self.path = os.path.realpath(path) 47 self.path = os.path.realpath(path)