diff mercurial/helptext/config.txt @ 46332:25be21ec6c65

share: rework config options to be much clearer and easier Recently I implemented various boolean configs which control how to behave when there is a share-safe mismatch between source and share repository. Mismatch means that source supports share-safe where as share does not or vice versa. However, while discussion and documentation we realized that it's too complicated and there are some combinations of values which makes no sense. We decided to introduce a config option with 4 possible values which makes controlling and understanding things easier. The config option `share.safe-mismatch.source-{not-}safe` can have following 4 values: * abort (default): error out if there is mismatch * allow: allow to work with respecting share source configuration * {up|down}grade-abort: try to {up|down}grade, if it fails, abort * {up|down}grade-allow: try to {up|down}grade, if it fails, continue in allow mode I am not sure if I can explain 3 config options which I deleted right now in just 5 lines which is a sign of how complex they became. No test changes demonstrate that functionality is same, only names have changed. Differential Revision: https://phab.mercurial-scm.org/D9785
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 18 Jan 2021 21:37:20 +0530
parents 014ac7a32048
children 4f17773fc6b5
line wrap: on
line diff
--- a/mercurial/helptext/config.txt	Thu Jan 14 21:34:12 2021 +0530
+++ b/mercurial/helptext/config.txt	Mon Jan 18 21:37:20 2021 +0530
@@ -1932,6 +1932,46 @@
     Currently, only the rebase and absorb commands consider this configuration.
     (EXPERIMENTAL)
 
+``share``
+---------
+
+``safe-mismatch.source-safe``
+
+    Controls what happens when the shared repository does not use the
+    share-safe mechanism but its source repository does.
+
+    Possible values are `abort` (default), `allow`, `upgrade-abort` and
+    `upgrade-abort`.
+
+    ``abort``
+    Disallows running any command and aborts
+    ``allow``
+    Respects the feature presence in the share source
+    ``upgrade-abort``
+    tries to upgrade the share to use share-safe; if it fails, aborts
+    ``upgrade-allow``
+    tries to upgrade the share; if it fails, continue by
+    respecting the share source setting
+
+``safe-mismatch.source-not-safe``
+
+    Controls what happens when the shared repository uses the share-safe
+    mechanism but its source does not.
+
+    Possible values are `abort` (default), `allow`, `downgrade-abort` and
+    `downgrade-abort`.
+
+    ``abort``
+    Disallows running any command and aborts
+    ``allow``
+    Respects the feature presence in the share source
+    ``downgrade-abort``
+    tries to downgrade the share to not use share-safe; if it fails, aborts
+    ``downgrade-allow``
+    tries to downgrade the share to not use share-safe;
+    if it fails, continue by respecting the shared source setting
+
+
 ``storage``
 -----------