Show More
@@ -681,6 +681,9 b' coreconfigitem(' | |||||
681 | b'experimental', b'exp-persistent-nodemap.mmap', default=True, |
|
681 | b'experimental', b'exp-persistent-nodemap.mmap', default=True, | |
682 | ) |
|
682 | ) | |
683 | coreconfigitem( |
|
683 | coreconfigitem( | |
|
684 | b'experimental', b'exp-persistent-nodemap.mode', default=b'compat', | |||
|
685 | ) | |||
|
686 | coreconfigitem( | |||
684 | b'experimental', b'server.filesdata.recommended-batch-size', default=50000, |
|
687 | b'experimental', b'server.filesdata.recommended-batch-size', default=50000, | |
685 | ) |
|
688 | ) | |
686 | coreconfigitem( |
|
689 | coreconfigitem( |
@@ -937,6 +937,8 b' def resolverevlogstorevfsoptions(ui, req' | |||||
937 | options[b'exp-persistent-nodemap'] = True |
|
937 | options[b'exp-persistent-nodemap'] = True | |
938 | if ui.configbool(b'experimental', b'exp-persistent-nodemap.mmap'): |
|
938 | if ui.configbool(b'experimental', b'exp-persistent-nodemap.mmap'): | |
939 | options[b'exp-persistent-nodemap.mmap'] = True |
|
939 | options[b'exp-persistent-nodemap.mmap'] = True | |
|
940 | epnm = ui.config(b'experimental', b'exp-persistent-nodemap.mode') | |||
|
941 | options[b'exp-persistent-nodemap.mode'] = epnm | |||
940 | if ui.configbool(b'devel', b'persistent-nodemap'): |
|
942 | if ui.configbool(b'devel', b'persistent-nodemap'): | |
941 | options[b'devel-force-nodemap'] = True |
|
943 | options[b'devel-force-nodemap'] = True | |
942 |
|
944 |
@@ -13,6 +13,8 b' import os' | |||||
13 | import re |
|
13 | import re | |
14 | import struct |
|
14 | import struct | |
15 |
|
15 | |||
|
16 | from ..i18n import _ | |||
|
17 | ||||
16 | from .. import ( |
|
18 | from .. import ( | |
17 | error, |
|
19 | error, | |
18 | node as nodemod, |
|
20 | node as nodemod, | |
@@ -105,6 +107,9 b' class _NoTransaction(object):' | |||||
105 | def addabort(self, *args, **kwargs): |
|
107 | def addabort(self, *args, **kwargs): | |
106 | pass |
|
108 | pass | |
107 |
|
109 | |||
|
110 | def _report(self, *args): | |||
|
111 | pass | |||
|
112 | ||||
108 |
|
113 | |||
109 | def update_persistent_nodemap(revlog): |
|
114 | def update_persistent_nodemap(revlog): | |
110 | """update the persistent nodemap right now |
|
115 | """update the persistent nodemap right now | |
@@ -138,6 +143,11 b' def _persist_nodemap(tr, revlog, pending' | |||||
138 | ondisk_docket = revlog._nodemap_docket |
|
143 | ondisk_docket = revlog._nodemap_docket | |
139 | feed_data = util.safehasattr(revlog.index, "update_nodemap_data") |
|
144 | feed_data = util.safehasattr(revlog.index, "update_nodemap_data") | |
140 | use_mmap = revlog.opener.options.get(b"exp-persistent-nodemap.mmap") |
|
145 | use_mmap = revlog.opener.options.get(b"exp-persistent-nodemap.mmap") | |
|
146 | mode = revlog.opener.options.get(b"exp-persistent-nodemap.mode") | |||
|
147 | if not can_incremental: | |||
|
148 | msg = _(b"persistent nodemap in strict mode without efficient method") | |||
|
149 | if mode == b'warn': | |||
|
150 | tr._report(b"%s\n" % msg) | |||
141 |
|
151 | |||
142 | data = None |
|
152 | data = None | |
143 | # first attemp an incremental update of the data |
|
153 | # first attemp an incremental update of the data |
@@ -10,7 +10,9 b' Test the persistent on-disk nodemap' | |||||
10 | > [devel] |
|
10 | > [devel] | |
11 | > persistent-nodemap=yes |
|
11 | > persistent-nodemap=yes | |
12 | > EOF |
|
12 | > EOF | |
13 | $ hg debugbuilddag .+5000 --new-file |
|
13 | $ hg debugbuilddag .+5000 --new-file --config "experimental.exp-persistent-nodemap.mode=warn" | |
|
14 | persistent nodemap in strict mode without efficient method (no-rust no-pure !) | |||
|
15 | persistent nodemap in strict mode without efficient method (no-rust no-pure !) | |||
14 | $ hg debugnodemap --metadata |
|
16 | $ hg debugnodemap --metadata | |
15 | uid: ???????????????? (glob) |
|
17 | uid: ???????????????? (glob) | |
16 | tip-rev: 5000 |
|
18 | tip-rev: 5000 |
General Comments 0
You need to be logged in to leave comments.
Login now