##// END OF EJS Templates
changectx: move `IndexError` handling in the top level try except...
Pierre-Yves David -
r23013:b50ed6b9 default
parent child Browse files
Show More
@@ -378,11 +378,7 b' class changectx(basectx):'
378
378
379 try:
379 try:
380 if isinstance(changeid, int):
380 if isinstance(changeid, int):
381 try:
381 self._node = repo.changelog.node(changeid)
382 self._node = repo.changelog.node(changeid)
383 except IndexError:
384 raise error.RepoLookupError(
385 _("unknown revision '%s'") % changeid)
386 self._rev = changeid
382 self._rev = changeid
387 return
383 return
388 if isinstance(changeid, long):
384 if isinstance(changeid, long):
@@ -463,8 +459,8 b' class changectx(basectx):'
463 changeid = hex(changeid)
459 changeid = hex(changeid)
464 except TypeError:
460 except TypeError:
465 pass
461 pass
466 except Exception:
462 except IndexError:
467 raise
463 pass
468 raise error.RepoLookupError(
464 raise error.RepoLookupError(
469 _("unknown revision '%s'") % changeid)
465 _("unknown revision '%s'") % changeid)
470
466
General Comments 0
You need to be logged in to leave comments. Login now