##// END OF EJS Templates
tags: support reading tags cache without populating...
Gregory Szorc -
r25380:eaa456c5 default
parent child Browse files
Show More
@@ -442,11 +442,13 b' class hgtagsfnodescache(object):'
442 self._raw.pop()
442 self._raw.pop()
443 self._dirtyoffset = len(self._raw)
443 self._dirtyoffset = len(self._raw)
444
444
445 def getfnode(self, node):
445 def getfnode(self, node, computemissing=True):
446 """Obtain the filenode of the .hgtags file at a specified revision.
446 """Obtain the filenode of the .hgtags file at a specified revision.
447
447
448 If the value is in the cache, the entry will be validated and returned.
448 If the value is in the cache, the entry will be validated and returned.
449 Otherwise, the filenode will be computed and returned.
449 Otherwise, the filenode will be computed and returned unless
450 "computemissing" is False, in which case None will be returned without
451 any potentially expensive computation being performed.
450
452
451 If an .hgtags does not exist at the specified revision, nullid is
453 If an .hgtags does not exist at the specified revision, nullid is
452 returned.
454 returned.
@@ -470,7 +472,12 b' class hgtagsfnodescache(object):'
470
472
471 # Fall through.
473 # Fall through.
472
474
473 # If we get here, the entry is either missing or invalid. Populate it.
475 # If we get here, the entry is either missing or invalid.
476
477 if not computemissing:
478 return None
479
480 # Populate missing entry.
474 try:
481 try:
475 fnode = ctx.filenode('.hgtags')
482 fnode = ctx.filenode('.hgtags')
476 except error.LookupError:
483 except error.LookupError:
General Comments 0
You need to be logged in to leave comments. Login now