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