changectx: move `IndexError` handling in the top level try except
This one can be handled by the top level catching.
--- a/mercurial/context.py Wed Oct 15 16:05:24 2014 -0700
+++ b/mercurial/context.py Wed Oct 15 16:14:50 2014 -0700
@@ -378,11 +378,7 @@
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 @@
changeid = hex(changeid)
except TypeError:
pass
- except Exception:
- raise
+ except IndexError:
+ pass
raise error.RepoLookupError(
_("unknown revision '%s'") % changeid)