##// END OF EJS Templates
nodemap: add a optional `nodemap_add_full` method on indexes...
marmoute -
r44795:7f4f7ef3 default
parent child Browse files
Show More
@@ -149,6 +149,13 b' class PersistentNodeMapIndexObject(Index'
149 through the dedicated `devel.persistent-nodemap` config.
149 through the dedicated `devel.persistent-nodemap` config.
150 """
150 """
151
151
152 def nodemap_data_all(self):
153 """Return bytes containing a full serialization of a nodemap
154
155 The nodemap should be valid for the full set of revisions in the
156 index."""
157 return nodemaputil.persistent_data(self)
158
152
159
153 class InlinedIndexObject(BaseIndexObject):
160 class InlinedIndexObject(BaseIndexObject):
154 def __init__(self, data, inline=0):
161 def __init__(self, data, inline=0):
@@ -15,7 +15,7 b' import struct'
15 from .. import (
15 from .. import (
16 error,
16 error,
17 node as nodemod,
17 node as nodemod,
18 pycompat,
18 util,
19 )
19 )
20
20
21
21
@@ -69,6 +69,9 b' def _persist_nodemap(tr, revlog):'
69 if revlog.nodemap_file is None:
69 if revlog.nodemap_file is None:
70 msg = "calling persist nodemap on a revlog without the feature enableb"
70 msg = "calling persist nodemap on a revlog without the feature enableb"
71 raise error.ProgrammingError(msg)
71 raise error.ProgrammingError(msg)
72 if util.safehasattr(revlog.index, "nodemap_data_all"):
73 data = revlog.index.nodemap_data_all()
74 else:
72 data = persistent_data(revlog.index)
75 data = persistent_data(revlog.index)
73 uid = _make_uid()
76 uid = _make_uid()
74 datafile = _rawdata_filepath(revlog, uid)
77 datafile = _rawdata_filepath(revlog, uid)
General Comments 0
You need to be logged in to leave comments. Login now