Patchwork D8418: nodemap: drop the 'exp-' prefix for internal opener option

login
register
mail settings
Submitter phabricator
Date April 15, 2020, noon
Message ID <232b1637d2f766945e34975714bda500@localhost.localdomain>
Download mbox | patch
Permalink /patch/46124/
State Not Applicable
Headers show

Comments

phabricator - April 15, 2020, noon
marmoute updated this revision to Diff 21095.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8418?vs=21066&id=21095

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8418/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8418

AFFECTED FILES
  mercurial/changelog.py
  mercurial/localrepo.py
  mercurial/manifest.py
  mercurial/revlogutils/nodemap.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/revlogutils/nodemap.py b/mercurial/revlogutils/nodemap.py
--- a/mercurial/revlogutils/nodemap.py
+++ b/mercurial/revlogutils/nodemap.py
@@ -50,7 +50,7 @@ 
     docket.data_unused = data_unused
 
     filename = _rawdata_filepath(revlog, docket)
-    use_mmap = revlog.opener.options.get(b"exp-persistent-nodemap.mmap")
+    use_mmap = revlog.opener.options.get(b"persistent-nodemap.mmap")
     try:
         with revlog.opener(filename) as fd:
             if use_mmap:
@@ -142,8 +142,8 @@ 
     can_incremental = util.safehasattr(revlog.index, "nodemap_data_incremental")
     ondisk_docket = revlog._nodemap_docket
     feed_data = util.safehasattr(revlog.index, "update_nodemap_data")
-    use_mmap = revlog.opener.options.get(b"exp-persistent-nodemap.mmap")
-    mode = revlog.opener.options.get(b"exp-persistent-nodemap.mode")
+    use_mmap = revlog.opener.options.get(b"persistent-nodemap.mmap")
+    mode = revlog.opener.options.get(b"persistent-nodemap.mode")
     if not can_incremental:
         msg = _(b"persistent nodemap in strict mode without efficient method")
         if mode == b'warn':
diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -1588,9 +1588,7 @@ 
             checkambig=not bool(tree),
             mmaplargeindex=True,
             upperboundcomp=MAXCOMPRESSION,
-            persistentnodemap=opener.options.get(
-                b'exp-persistent-nodemap', False
-            ),
+            persistentnodemap=opener.options.get(b'persistent-nodemap', False),
         )
 
         self.index = self._revlog.index
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -937,11 +937,11 @@ 
     if ui.configbool(b'experimental', b'rust.index'):
         options[b'rust.index'] = True
     if NODEMAP_REQUIREMENT in requirements:
-        options[b'exp-persistent-nodemap'] = True
+        options[b'persistent-nodemap'] = True
     if ui.configbool(b'experimental', b'exp-persistent-nodemap.mmap'):
-        options[b'exp-persistent-nodemap.mmap'] = True
+        options[b'persistent-nodemap.mmap'] = True
     epnm = ui.config(b'experimental', b'exp-persistent-nodemap.mode')
-    options[b'exp-persistent-nodemap.mode'] = epnm
+    options[b'persistent-nodemap.mode'] = epnm
     if ui.configbool(b'devel', b'persistent-nodemap'):
         options[b'devel-force-nodemap'] = True
 
diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -385,9 +385,7 @@ 
             datafile=datafile,
             checkambig=True,
             mmaplargeindex=True,
-            persistentnodemap=opener.options.get(
-                b'exp-persistent-nodemap', False
-            ),
+            persistentnodemap=opener.options.get(b'persistent-nodemap', False),
         )
 
         if self._initempty and (self.version & 0xFFFF == revlog.REVLOGV1):