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

login
register
mail settings
Submitter phabricator
Date April 14, 2020, 3:50 p.m.
Message ID <differential-rev-PHID-DREV-wqtvaogjytil57d2i72x-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46095/
State Superseded
Headers show

Comments

phabricator - April 14, 2020, 3:50 p.m.
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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 = _("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
@@ -1557,9 +1557,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):