mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
changectx: move IndexError
handling in the top level try except
This one can be handled by the top level catching.
This commit is contained in:
parent
4b3ae249b1
commit
de4a821442
@ -378,11 +378,7 @@ class changectx(basectx):
|
||||
|
||||
try:
|
||||
if isinstance(changeid, int):
|
||||
try:
|
||||
self._node = repo.changelog.node(changeid)
|
||||
except IndexError:
|
||||
raise error.RepoLookupError(
|
||||
_("unknown revision '%s'") % changeid)
|
||||
self._node = repo.changelog.node(changeid)
|
||||
self._rev = changeid
|
||||
return
|
||||
if isinstance(changeid, long):
|
||||
@ -463,8 +459,8 @@ class changectx(basectx):
|
||||
changeid = hex(changeid)
|
||||
except TypeError:
|
||||
pass
|
||||
except Exception:
|
||||
raise
|
||||
except IndexError:
|
||||
pass
|
||||
raise error.RepoLookupError(
|
||||
_("unknown revision '%s'") % changeid)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user