hgext/convert/hg.py
changeset 5360 b98c377b3c16
parent 5353 9c0f864fddca
parent 5358 4fbd27bf04b1
child 5378 8a2915f57dfc
--- a/hgext/convert/hg.py	Tue Oct 02 20:25:35 2007 +0200
+++ b/hgext/convert/hg.py	Tue Oct 02 13:49:36 2007 -0700
@@ -156,7 +156,10 @@
 class mercurial_source(converter_source):
     def __init__(self, ui, path, rev=None):
         converter_source.__init__(self, ui, path, rev)
-        self.repo = hg.repository(self.ui, path)
+        try:
+            self.repo = hg.repository(self.ui, path)
+        except:
+            raise NoRepo("could not open hg repo %s as source" % path)
         self.lastrev = None
         self.lastctx = None