##// END OF EJS Templates
revlog: drop LookupError alias (API)...
Gregory Szorc -
r39811:97459247 default
parent child Browse files
Show More
@@ -104,8 +104,6 b" parsers = policy.importmod(r'parsers')"
104 104 _maxinline = 131072
105 105 _chunksize = 1048576
106 106
107 LookupError = error.LookupError
108
109 107 # Store flag processors (cf. 'addflagprocessor()' to register)
110 108 _flagprocessors = {
111 109 REVIDX_ISCENSORED: None,
@@ -619,7 +617,7 b' class revlog(object):'
619 617 # parsers.c radix tree lookup failed
620 618 if node == wdirid or node in wdirfilenodeids:
621 619 raise error.WdirUnsupported
622 raise LookupError(node, self.indexfile, _('no node'))
620 raise error.LookupError(node, self.indexfile, _('no node'))
623 621 except KeyError:
624 622 # pure python cache lookup failed
625 623 n = self._nodecache
@@ -637,7 +635,7 b' class revlog(object):'
637 635 return r
638 636 if node == wdirid or node in wdirfilenodeids:
639 637 raise error.WdirUnsupported
640 raise LookupError(node, self.indexfile, _('no node'))
638 raise error.LookupError(node, self.indexfile, _('no node'))
641 639
642 640 # Accessors for index entries.
643 641
@@ -1235,7 +1233,7 b' class revlog(object):'
1235 1233 node = id
1236 1234 self.rev(node) # quick search the index
1237 1235 return node
1238 except LookupError:
1236 except error.LookupError:
1239 1237 pass # may be partial hex id
1240 1238 try:
1241 1239 # str(rev)
@@ -1255,7 +1253,7 b' class revlog(object):'
1255 1253 node = bin(id)
1256 1254 self.rev(node)
1257 1255 return node
1258 except (TypeError, LookupError):
1256 except (TypeError, error.LookupError):
1259 1257 pass
1260 1258
1261 1259 def _partialmatch(self, id):
@@ -1320,7 +1318,7 b' class revlog(object):'
1320 1318 if n:
1321 1319 return n
1322 1320
1323 raise LookupError(id, self.indexfile, _('no match found'))
1321 raise error.LookupError(id, self.indexfile, _('no match found'))
1324 1322
1325 1323 def shortest(self, node, minlength=1):
1326 1324 """Find the shortest unambiguous prefix that matches node."""
@@ -1333,7 +1331,7 b' class revlog(object):'
1333 1331 # single 'ff...' match
1334 1332 return True
1335 1333 if node is None:
1336 raise LookupError(node, self.indexfile, _('no node'))
1334 raise error.LookupError(node, self.indexfile, _('no node'))
1337 1335 return True
1338 1336
1339 1337 def maybewdir(prefix):
@@ -1354,7 +1352,7 b' class revlog(object):'
1354 1352 return disambiguate(hexnode, length)
1355 1353 except error.RevlogError:
1356 1354 if node != wdirid:
1357 raise LookupError(node, self.indexfile, _('no node'))
1355 raise error.LookupError(node, self.indexfile, _('no node'))
1358 1356 except AttributeError:
1359 1357 # Fall through to pure code
1360 1358 pass
@@ -2085,12 +2083,12 b' class revlog(object):'
2085 2083
2086 2084 for p in (p1, p2):
2087 2085 if p not in self.nodemap:
2088 raise LookupError(p, self.indexfile,
2089 _('unknown parent'))
2086 raise error.LookupError(p, self.indexfile,
2087 _('unknown parent'))
2090 2088
2091 2089 if deltabase not in self.nodemap:
2092 raise LookupError(deltabase, self.indexfile,
2093 _('unknown delta base'))
2090 raise error.LookupError(deltabase, self.indexfile,
2091 _('unknown delta base'))
2094 2092
2095 2093 baserev = self.rev(deltabase)
2096 2094
General Comments 0
You need to be logged in to leave comments. Login now