mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
fastannotate: do not cache lastnode
Summary: When the server was handling a "getannotate" request, it may read lastnode, update the revmap, then read lastnode again. So lastnode should not be cached. Test Plan: `arc unit` Reviewers: #sourcecontrol, ikostia Reviewed By: ikostia Subscribers: mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4327046 Signature: t1:4327046:1481904335:2a236091b5d36872df5703e4bb9f3651012a2f02
This commit is contained in:
parent
9fe5387619
commit
9a67f6b7f1
@ -203,7 +203,7 @@ class _annotatecontext(object):
|
||||
self._node2path.clear()
|
||||
_unlinkpaths([self.revmappath, self.linelogpath])
|
||||
|
||||
@util.propertycache
|
||||
@property
|
||||
def lastnode(self):
|
||||
"""return last node in revmap, or None if revmap is empty"""
|
||||
if self._revmap is None:
|
||||
|
Loading…
Reference in New Issue
Block a user