Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/nodemap.py @ 44745:b4537125eb3c stable
nodemap: skip persistent nodemap warming for revlog not using it
Before this patch, the usual checking (especially, inline-ess) were not
performed when warming the cache through `hg debugupdatecache`.
This is now fixed.
Differential Revision: https://phab.mercurial-scm.org/D8408
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 13 Apr 2020 18:04:55 +0200 |
parents | 0792ad55e533 |
children | 6493f0a567c2 |
comparison
equal
deleted
inserted
replaced
44744:23dd43d94f50 | 44745:b4537125eb3c |
---|---|
110 """update the persistent nodemap right now | 110 """update the persistent nodemap right now |
111 | 111 |
112 To be used for updating the nodemap on disk outside of a normal transaction | 112 To be used for updating the nodemap on disk outside of a normal transaction |
113 setup (eg, `debugupdatecache`). | 113 setup (eg, `debugupdatecache`). |
114 """ | 114 """ |
115 if revlog._inline: | |
116 return # inlined revlog are too small for this to be relevant | |
117 if revlog.nodemap_file is None: | |
118 return # we do not use persistent_nodemap on this revlog | |
119 | |
115 notr = _NoTransaction() | 120 notr = _NoTransaction() |
116 _persist_nodemap(notr, revlog) | 121 _persist_nodemap(notr, revlog) |
117 for k in sorted(notr._postclose): | 122 for k in sorted(notr._postclose): |
118 notr._postclose[k](None) | 123 notr._postclose[k](None) |
119 | 124 |