Mercurial > hg
comparison hgext/convert/hg.py @ 10938:02d6149a480b stable
convert: write "repository" instead of "repo"
We should strive to avoid slang in our messages to the users.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sun, 18 Apr 2010 15:47:49 +0200 |
parents | 08a0f04b56bd |
children | 9f6731b03906 |
comparison
equal
deleted
inserted
replaced
10933:e3396b218e10 | 10938:02d6149a480b |
---|---|
34 self.lastbranch = None | 34 self.lastbranch = None |
35 if os.path.isdir(path) and len(os.listdir(path)) > 0: | 35 if os.path.isdir(path) and len(os.listdir(path)) > 0: |
36 try: | 36 try: |
37 self.repo = hg.repository(self.ui, path) | 37 self.repo = hg.repository(self.ui, path) |
38 if not self.repo.local(): | 38 if not self.repo.local(): |
39 raise NoRepo(_('%s is not a local Mercurial repo') % path) | 39 raise NoRepo(_('%s is not a local Mercurial repository') |
40 % path) | |
40 except error.RepoError, err: | 41 except error.RepoError, err: |
41 ui.traceback() | 42 ui.traceback() |
42 raise NoRepo(err.args[0]) | 43 raise NoRepo(err.args[0]) |
43 else: | 44 else: |
44 try: | 45 try: |
45 ui.status(_('initializing destination %s repository\n') % path) | 46 ui.status(_('initializing destination %s repository\n') % path) |
46 self.repo = hg.repository(self.ui, path, create=True) | 47 self.repo = hg.repository(self.ui, path, create=True) |
47 if not self.repo.local(): | 48 if not self.repo.local(): |
48 raise NoRepo(_('%s is not a local Mercurial repo') % path) | 49 raise NoRepo(_('%s is not a local Mercurial repository') |
50 % path) | |
49 self.created.append(path) | 51 self.created.append(path) |
50 except error.RepoError: | 52 except error.RepoError: |
51 ui.traceback() | 53 ui.traceback() |
52 raise NoRepo("could not create hg repo %s as sink" % path) | 54 raise NoRepo("could not create hg repository %s as sink" |
55 % path) | |
53 self.lock = None | 56 self.lock = None |
54 self.wlock = None | 57 self.wlock = None |
55 self.filemapmode = False | 58 self.filemapmode = False |
56 | 59 |
57 def before(self): | 60 def before(self): |
222 # repo, but some other bogus compatible-looking url | 225 # repo, but some other bogus compatible-looking url |
223 if not self.repo.local(): | 226 if not self.repo.local(): |
224 raise error.RepoError() | 227 raise error.RepoError() |
225 except error.RepoError: | 228 except error.RepoError: |
226 ui.traceback() | 229 ui.traceback() |
227 raise NoRepo("%s is not a local Mercurial repo" % path) | 230 raise NoRepo("%s is not a local Mercurial repository" % path) |
228 self.lastrev = None | 231 self.lastrev = None |
229 self.lastctx = None | 232 self.lastctx = None |
230 self._changescache = None | 233 self._changescache = None |
231 self.convertfp = None | 234 self.convertfp = None |
232 # Restrict converted revisions to startrev descendants | 235 # Restrict converted revisions to startrev descendants |