##// END OF EJS Templates
repo: remove the last few "pass" statements in localrepo.__getitem__...
Martin von Zweigbergk -
r40099:f84d7ed3 default
parent child Browse files
Show More
@@ -1255,16 +1255,12 b' class localrepository(object):'
1255 msg = _("working directory has unknown parent '%s'!")
1255 msg = _("working directory has unknown parent '%s'!")
1256 raise error.Abort(msg % short(changeid))
1256 raise error.Abort(msg % short(changeid))
1257 changeid = hex(changeid) # for the error message
1257 changeid = hex(changeid) # for the error message
1258 raise
1258
1259
1259 elif len(changeid) == 40:
1260 elif len(changeid) == 40:
1260 try:
1261 node = bin(changeid)
1261 node = bin(changeid)
1262 rev = self.changelog.rev(node)
1262 rev = self.changelog.rev(node)
1263 return context.changectx(self, rev, node)
1263 return context.changectx(self, rev, node)
1264 except error.FilteredLookupError:
1265 raise
1266 except LookupError:
1267 pass
1268 else:
1264 else:
1269 raise error.ProgrammingError(
1265 raise error.ProgrammingError(
1270 "unsupported changeid '%s' of type %s" %
1266 "unsupported changeid '%s' of type %s" %
@@ -1273,12 +1269,10 b' class localrepository(object):'
1273 except (error.FilteredIndexError, error.FilteredLookupError):
1269 except (error.FilteredIndexError, error.FilteredLookupError):
1274 raise error.FilteredRepoLookupError(_("filtered revision '%s'")
1270 raise error.FilteredRepoLookupError(_("filtered revision '%s'")
1275 % pycompat.bytestr(changeid))
1271 % pycompat.bytestr(changeid))
1276 except IndexError:
1272 except (IndexError, LookupError):
1277 pass
1273 raise error.RepoLookupError(_("unknown revision '%s'") % changeid)
1278 except error.WdirUnsupported:
1274 except error.WdirUnsupported:
1279 return context.workingctx(self)
1275 return context.workingctx(self)
1280 raise error.RepoLookupError(
1281 _("unknown revision '%s'") % changeid)
1282
1276
1283 def __contains__(self, changeid):
1277 def __contains__(self, changeid):
1284 """True if the given changeid exists
1278 """True if the given changeid exists
General Comments 0
You need to be logged in to leave comments. Login now