--- a/hgext/convert/darcs.py Sat Apr 04 19:43:00 2009 +0200
+++ b/hgext/convert/darcs.py Sat Apr 04 12:28:13 2009 -0500
@@ -24,6 +24,9 @@
# check for _darcs, ElementTree, _darcs/inventory so that we can
# easily skip test-convert-darcs if ElementTree is not around
+ if not os.path.exists(os.path.join(path, '_darcs', 'inventories')):
+ raise NoRepo("%s does not look like a darcs repo" % path)
+
if not os.path.exists(os.path.join(path, '_darcs')):
raise NoRepo("%s does not look like a darcs repo" % path)
@@ -32,9 +35,6 @@
if ElementTree is None:
raise util.Abort(_("Python ElementTree module is not available"))
- if not os.path.exists(os.path.join(path, '_darcs', 'inventories')):
- raise NoRepo("%s does not look like a darcs repo" % path)
-
self.path = os.path.realpath(path)
self.lastrev = None