Comments
Patch
@@ -15,6 +15,7 @@
from .. import (
error,
node as nodemod,
+ util,
)
@@ -68,7 +69,10 @@
if revlog.nodemap_file is None:
msg = "calling persist nodemap on a revlog without the feature enableb"
raise error.ProgrammingError(msg)
- data = persistent_data(revlog.index)
+ if util.safehasattr(revlog.index, "nodemap_data_all"):
+ data = revlog.index.nodemap_data_all()
+ else:
+ data = persistent_data(revlog.index)
uid = _make_uid()
datafile = _rawdata_filepath(revlog, uid)
olds = _other_rawdata_filepath(revlog, uid)
@@ -149,6 +149,13 @@
through the dedicated `devel.persistent-nodemap` config.
"""
+ def nodemap_data_all(self):
+ """Return bytes containing a full serialization of a nodemap
+
+ The nodemap should be valid for the full set of revisions in the
+ index."""
+ return nodemaputil.persistent_data(self)
+
class InlinedIndexObject(BaseIndexObject):
def __init__(self, data, inline=0):