comparison mercurial/revlogutils/nodemap.py @ 44792:5e3c718692bb

nodemap: drop the 'exp-' prefix for internal opener option The feature is now in a descent shape and we can consider having it "less" experimental. We won't be able to make it "totally" non-experimental, because its benefit rely on rust, which is totally experimental. Differential Revision: https://phab.mercurial-scm.org/D8418
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 14 Apr 2020 03:27:04 +0200
parents 261e71752d1f
children 89a2afe31e82
comparison
equal deleted inserted replaced
44791:b81486b609a3 44792:5e3c718692bb
48 docket.tip_node = pdata[offset : offset + tip_node_size] 48 docket.tip_node = pdata[offset : offset + tip_node_size]
49 docket.data_length = data_length 49 docket.data_length = data_length
50 docket.data_unused = data_unused 50 docket.data_unused = data_unused
51 51
52 filename = _rawdata_filepath(revlog, docket) 52 filename = _rawdata_filepath(revlog, docket)
53 use_mmap = revlog.opener.options.get(b"exp-persistent-nodemap.mmap") 53 use_mmap = revlog.opener.options.get(b"persistent-nodemap.mmap")
54 try: 54 try:
55 with revlog.opener(filename) as fd: 55 with revlog.opener(filename) as fd:
56 if use_mmap: 56 if use_mmap:
57 data = util.buffer(util.mmapread(fd, data_length)) 57 data = util.buffer(util.mmapread(fd, data_length))
58 else: 58 else:
140 raise error.ProgrammingError(msg) 140 raise error.ProgrammingError(msg)
141 141
142 can_incremental = util.safehasattr(revlog.index, "nodemap_data_incremental") 142 can_incremental = util.safehasattr(revlog.index, "nodemap_data_incremental")
143 ondisk_docket = revlog._nodemap_docket 143 ondisk_docket = revlog._nodemap_docket
144 feed_data = util.safehasattr(revlog.index, "update_nodemap_data") 144 feed_data = util.safehasattr(revlog.index, "update_nodemap_data")
145 use_mmap = revlog.opener.options.get(b"exp-persistent-nodemap.mmap") 145 use_mmap = revlog.opener.options.get(b"persistent-nodemap.mmap")
146 mode = revlog.opener.options.get(b"exp-persistent-nodemap.mode") 146 mode = revlog.opener.options.get(b"persistent-nodemap.mode")
147 if not can_incremental: 147 if not can_incremental:
148 msg = _(b"persistent nodemap in strict mode without efficient method") 148 msg = _(b"persistent nodemap in strict mode without efficient method")
149 if mode == b'warn': 149 if mode == b'warn':
150 tr._report(b"%s\n" % msg) 150 tr._report(b"%s\n" % msg)
151 elif mode == b'strict': 151 elif mode == b'strict':