Patchwork D9758: persistent-nodemap: add a revlog.storage.persistent-nodemap.slow-path option

login
register
mail settings
Submitter phabricator
Date Jan. 14, 2021, 4:05 a.m.
Message ID <differential-rev-PHID-DREV-6p7uxo3cdst42ogrrgta-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48068/
State Superseded
Headers show

Comments

phabricator - Jan. 14, 2021, 4:05 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  As discussed during the sprint, we want to prevent user to get an unexpected
  performance regression when accessing a repository using "persistent-nodemap"
  without the associated Rust extension.
  
  We start by adding a config declaration and some documentation.
  
  Since "allow" is the current behavior, we don't need to add any code. The option
  possible value will come later.
  
  Note that we already have a `storage.revlog.nodemap.mode` option, but that
  option is a bit different. It does some warning and checking at revlog
  instantiation time. While we want something done at requirements checking time.
  
  Since we plan for new names and new config value names, we introduce a new
  option and will drop the old one later.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/configitems.py
  mercurial/helptext/config.txt

CHANGE DETAILS




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

Patch

diff --git a/mercurial/helptext/config.txt b/mercurial/helptext/config.txt
--- a/mercurial/helptext/config.txt
+++ b/mercurial/helptext/config.txt
@@ -1953,6 +1953,18 @@ 
     For details on the "persistent-nodemap" feature, see:
     :hg:`help config format.use-persistent-nodemap`.
 
+``revlog.persistent-nodemap.slow-path``
+    Control the behavior of Merucrial when using a repository with "persistent"
+    nodemap with an installation of Mercurial without a fast implementation for
+    the feature:
+
+    ``allow``: Silently use the slower implementation to access the repository.
+
+    Default to "allow"
+
+    For details on the "persistent-nodemap" feature, see:
+    :hg:`help config format.use-persistent-nodemap`.
+
 ``revlog.reuse-external-delta-parent``
     Control the order in which delta parents are considered when adding new
     revisions from an external source.
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -1778,6 +1778,14 @@ 
 coreconfigitem(
     b'storage', b'revlog.nodemap.mode', default=b'compat', experimental=True
 )
+# experimental as long as format.use-persistent-nodemap is.
+coreconfigitem(
+    b'storage',
+    b'revlog.persistent-nodemap.slow-path',
+    default=b"allow",
+    experimental=True,
+)
+
 coreconfigitem(
     b'storage',
     b'revlog.reuse-external-delta',