Mercurial > hg
comparison hgext/convert/darcs.py @ 7973:db3a68fd9387
convert: attempt to check repo type before checking for tool
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 04 Apr 2009 12:28:13 -0500 |
parents | 82107c6b009e |
children | a1a5a57efe90 |
comparison
equal
deleted
inserted
replaced
7972:425a30ddfff6 | 7973:db3a68fd9387 |
---|---|
22 converter_source.__init__(self, ui, path, rev=rev) | 22 converter_source.__init__(self, ui, path, rev=rev) |
23 commandline.__init__(self, ui, 'darcs') | 23 commandline.__init__(self, ui, 'darcs') |
24 | 24 |
25 # check for _darcs, ElementTree, _darcs/inventory so that we can | 25 # check for _darcs, ElementTree, _darcs/inventory so that we can |
26 # easily skip test-convert-darcs if ElementTree is not around | 26 # easily skip test-convert-darcs if ElementTree is not around |
27 if not os.path.exists(os.path.join(path, '_darcs', 'inventories')): | |
28 raise NoRepo("%s does not look like a darcs repo" % path) | |
29 | |
27 if not os.path.exists(os.path.join(path, '_darcs')): | 30 if not os.path.exists(os.path.join(path, '_darcs')): |
28 raise NoRepo("%s does not look like a darcs repo" % path) | 31 raise NoRepo("%s does not look like a darcs repo" % path) |
29 | 32 |
30 checktool('darcs') | 33 checktool('darcs') |
31 | 34 |
32 if ElementTree is None: | 35 if ElementTree is None: |
33 raise util.Abort(_("Python ElementTree module is not available")) | 36 raise util.Abort(_("Python ElementTree module is not available")) |
34 | |
35 if not os.path.exists(os.path.join(path, '_darcs', 'inventories')): | |
36 raise NoRepo("%s does not look like a darcs repo" % path) | |
37 | 37 |
38 self.path = os.path.realpath(path) | 38 self.path = os.path.realpath(path) |
39 | 39 |
40 self.lastrev = None | 40 self.lastrev = None |
41 self.changes = {} | 41 self.changes = {} |