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