hgext/convert/hg.py
changeset 5522 f5345a2d2391
parent 5521 03496d4fa509
child 5553 ee80591f5636
child 5918 1716c8a0bd09
--- a/hgext/convert/hg.py	Fri Nov 09 20:21:35 2007 -0200
+++ b/hgext/convert/hg.py	Fri Nov 09 20:21:35 2007 -0200
@@ -187,10 +187,11 @@
             self.repo = hg.repository(self.ui, path)
             # try to provoke an exception if this isn't really a hg
             # repo, but some other bogus compatible-looking url
-            self.repo.heads()
+            if not self.repo.local():
+                raise hg.RepoError()
         except hg.RepoError:
             ui.print_exc()
-            raise NoRepo("%s does not look like a Mercurial repo" % path)
+            raise NoRepo("%s is not a local Mercurial repo" % path)
         self.lastrev = None
         self.lastctx = None
         self._changescache = None