##// END OF EJS Templates
Make distinct lookup error for localrepo.lookup...
Matt Mackall -
r9423:1444a42f default
parent child Browse files
Show More
@@ -36,6 +36,9 b' class ConfigError(Exception):'
36 class RepoError(Exception):
36 class RepoError(Exception):
37 pass
37 pass
38
38
39 class RepoLookupError(RepoError):
40 pass
41
39 class CapabilityError(RepoError):
42 class CapabilityError(RepoError):
40 pass
43 pass
41
44
@@ -137,10 +137,12 b' def share(ui, source, dest=None, update='
137 if update is not True:
137 if update is not True:
138 checkout = update
138 checkout = update
139 for test in (checkout, 'default', 'tip'):
139 for test in (checkout, 'default', 'tip'):
140 if test is None:
141 continue
140 try:
142 try:
141 uprev = r.lookup(test)
143 uprev = r.lookup(test)
142 break
144 break
143 except LookupError:
145 except error.RepoLookupError:
144 continue
146 continue
145 _update(r, uprev)
147 _update(r, uprev)
146
148
@@ -309,10 +311,12 b' def clone(ui, source, dest=None, pull=Fa'
309 if update is not True:
311 if update is not True:
310 checkout = update
312 checkout = update
311 for test in (checkout, 'default', 'tip'):
313 for test in (checkout, 'default', 'tip'):
314 if test is None:
315 continue
312 try:
316 try:
313 uprev = dest_repo.lookup(test)
317 uprev = dest_repo.lookup(test)
314 break
318 break
315 except:
319 except error.RepoLookupError:
316 continue
320 continue
317 _update(dest_repo, uprev)
321 _update(dest_repo, uprev)
318
322
@@ -509,7 +509,7 b' class localrepository(repo.repository):'
509 key = hex(key)
509 key = hex(key)
510 except:
510 except:
511 pass
511 pass
512 raise error.RepoError(_("unknown revision '%s'") % key)
512 raise error.RepoLookupError(_("unknown revision '%s'") % key)
513
513
514 def local(self):
514 def local(self):
515 return True
515 return True
General Comments 0
You need to be logged in to leave comments. Login now