D8174: nodemap: refresh the persistent data on nodemap creation
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Wed Mar 11 15:42:23 UTC 2020
Closed by commit rHG87b327de772c: nodemap: refresh the persistent data on nodemap creation (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8174?vs=20677&id=20689
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8174/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8174
AFFECTED FILES
mercurial/revlog.py
CHANGE DETAILS
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -760,7 +760,20 @@
self._chainbasecache.clear()
self._chunkcache = (0, b'')
self._pcache = {}
+ self._nodemap_docket = None
self.index.clearcaches()
+ # The python code is the one responsible for validating the docket, we
+ # end up having to refresh it here.
+ use_nodemap = (
+ not self._inline
+ and self.nodemap_file is not None
+ and util.safehasattr(self.index, 'update_nodemap_data')
+ )
+ if use_nodemap:
+ nodemap_data = nodemaputil.persisted_data(self)
+ if nodemap_data is not None:
+ self._nodemap_docket = nodemap_data[0]
+ self.index.update_nodemap_data(*nodemap_data)
def rev(self, node):
try:
To: marmoute, indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list