Patchwork D11809: docs: add missing dirstate-v2 documentation

login
register
mail settings
Submitter phabricator
Date Nov. 26, 2021, 1:31 p.m.
Message ID <differential-rev-PHID-DREV-7reiwgm7ryzzaed3ym4d-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50135/
State New
Headers show

Comments

phabricator - Nov. 26, 2021, 1:31 p.m.
Alphare created this revision.
Alphare added a comment.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.


  Pending CI refresh

REVISION SUMMARY
  A user trying out the dirstate-v2 feature without the Rust extensions is
  currently faced with an error message suggesting this help section, which does
  not exist.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/helptext/config.txt

CHANGE DETAILS




To: Alphare, #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
@@ -892,6 +892,35 @@ 
 
     Enabled by default.
 
+``exp-rc-dirstate-v2``
+    Enable or disable the "dirstate-v2" experimental feature. The dirstate is a
+    core feature of all commands interacting with the working copy, and the new
+    version is more robust, stores more information and is faster.
+
+    The performance-improving version of this feature is currently only
+    implemented in Rust (see :hg:`help rust`), so people not using a version of
+    Mercurial compiled with the Rust parts might actually suffer some slowdown.
+    For this reason, such versions will by default refuse to access repositories
+    with "dirstate-v2" enabled.
+
+    This behavior can be adjusted via configuration: check
+    :hg:`help config.storage.dirstate-v2.slow-path` for details.
+
+    Repositories with this on-disk format require Mercurial 6.0 or above.
+
+    By default this format variant is disabled if the fast implementation is not
+    available, and enabled by default if the fast implementation is available.
+
+    To accomodate installs of Mercurial without the fast implementation, you can
+    downgrade your repository. To do so run the following command:
+
+    $ hg debugupgraderepo \
+          --run \
+          --config format.exp-rc-dirstate-v2=False \
+          --config storage.dirstate-v2.slow-path=allow
+
+    For a more comprehensive guide, see :hg:`help internals.dirstate-v2`.
+
 ``use-persistent-nodemap``
     Enable or disable the "persistent-nodemap" feature which improves
     performance if the rust extensions are available.