Mercurial > hg
comparison hgext/convert/hg.py @ 5522:f5345a2d2391
convert: make sure mercurial_source has a local hg repo
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 09 Nov 2007 20:21:35 -0200 |
parents | 03496d4fa509 |
children | ee80591f5636 1716c8a0bd09 |
comparison
equal
deleted
inserted
replaced
5521:03496d4fa509 | 5522:f5345a2d2391 |
---|---|
185 converter_source.__init__(self, ui, path, rev) | 185 converter_source.__init__(self, ui, path, rev) |
186 try: | 186 try: |
187 self.repo = hg.repository(self.ui, path) | 187 self.repo = hg.repository(self.ui, path) |
188 # try to provoke an exception if this isn't really a hg | 188 # try to provoke an exception if this isn't really a hg |
189 # repo, but some other bogus compatible-looking url | 189 # repo, but some other bogus compatible-looking url |
190 self.repo.heads() | 190 if not self.repo.local(): |
191 raise hg.RepoError() | |
191 except hg.RepoError: | 192 except hg.RepoError: |
192 ui.print_exc() | 193 ui.print_exc() |
193 raise NoRepo("%s does not look like a Mercurial repo" % path) | 194 raise NoRepo("%s is not a local Mercurial repo" % path) |
194 self.lastrev = None | 195 self.lastrev = None |
195 self.lastctx = None | 196 self.lastctx = None |
196 self._changescache = None | 197 self._changescache = None |
197 | 198 |
198 def changectx(self, rev): | 199 def changectx(self, rev): |