Mercurial > hg
diff mercurial/revlog.py @ 44445:336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
When appropriate, the nodemap cache file will be created.
Differential Revision: https://phab.mercurial-scm.org/D8173
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 18 Feb 2020 19:11:13 +0100 |
parents | f7459da77f23 |
children | 9d2b2df2c2ba |
line wrap: on
line diff
--- a/mercurial/revlog.py Sat Feb 29 19:31:33 2020 +0100 +++ b/mercurial/revlog.py Tue Feb 18 19:11:13 2020 +0100 @@ -748,6 +748,13 @@ return False return True + def update_caches(self, transaction): + if self.nodemap_file is not None: + if transaction is None: + nodemaputil.update_persistent_nodemap(self) + else: + nodemaputil.setup_persistent_nodemap(transaction, self) + def clearcaches(self): self._revisioncache = None self._chainbasecache.clear()