# HG changeset patch # User Alexis S. L. Carvalho # Date 1194646895 7200 # Node ID f5345a2d2391ed3a387b31135789ab0136ef5757 # Parent 03496d4fa5092acd3c8d4ea40dfa163c29e6c517 convert: make sure mercurial_source has a local hg repo diff -r 03496d4fa509 -r f5345a2d2391 hgext/convert/hg.py --- 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