tracked-file: rename the format option to use `use-`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 17 Feb 2022 06:41:54 +0100
changeset 48792 8bbb1abb9d19
parent 48791 1af95465961a
child 48793 6e559391f96e
tracked-file: rename the format option to use `use-` This is more consistent with the other options. Differential Revision: https://phab.mercurial-scm.org/D12200
mercurial/configitems.py
mercurial/helptext/config.txt
mercurial/localrepo.py
tests/test-help.t
tests/test-status-tracked-key.t
--- a/mercurial/configitems.py	Thu Feb 17 06:35:42 2022 +0100
+++ b/mercurial/configitems.py	Thu Feb 17 06:41:54 2022 +0100
@@ -1279,13 +1279,13 @@
 )
 coreconfigitem(
     b'format',
-    b'dirstate-tracked-key',
+    b'use-dirstate-tracked-key',
     default=False,
     experimental=True,
 )
 coreconfigitem(
     b'format',
-    b'dirstate-tracked-key.version',
+    b'use-dirstate-tracked-key.version',
     default=1,
     experimental=True,
 )
--- a/mercurial/helptext/config.txt	Thu Feb 17 06:35:42 2022 +0100
+++ b/mercurial/helptext/config.txt	Thu Feb 17 06:41:54 2022 +0100
@@ -944,7 +944,7 @@
 
     For a more comprehensive guide, see :hg:`help internals.dirstate-v2`.
 
-``dirstate-tracked-key``
+``use-dirstate-tracked-key``
     Enable or disable the writing of "tracked key" file alongside the dirstate.
     (default to disabled)
 
--- a/mercurial/localrepo.py	Thu Feb 17 06:35:42 2022 +0100
+++ b/mercurial/localrepo.py	Thu Feb 17 06:41:54 2022 +0100
@@ -3695,10 +3695,10 @@
         else:
             requirements.add(requirementsmod.SHARED_REQUIREMENT)
 
-    if ui.configbool(b'format', b'dirstate-tracked-key'):
-        version = ui.configint(b'format', b'dirstate-tracked-key.version')
+    if ui.configbool(b'format', b'use-dirstate-tracked-key'):
+        version = ui.configint(b'format', b'use-dirstate-tracked-key.version')
         msg = _("ignoring unknown tracked key version: %d\n")
-        hint = _("see `hg help config.format.exp-dirstate-tracked-key-version")
+        hint = _("see `hg help config.format.use-dirstate-tracked-key-version")
         if version != 1:
             ui.warn(msg % version, hint=hint)
         else:
--- a/tests/test-help.t	Thu Feb 17 06:35:42 2022 +0100
+++ b/tests/test-help.t	Thu Feb 17 06:41:54 2022 +0100
@@ -1599,7 +1599,7 @@
   
       "use-dirstate-v2"
   
-      "dirstate-tracked-key"
+      "use-dirstate-tracked-key"
   
       "use-persistent-nodemap"
   
--- a/tests/test-status-tracked-key.t	Thu Feb 17 06:35:42 2022 +0100
+++ b/tests/test-status-tracked-key.t	Thu Feb 17 06:41:54 2022 +0100
@@ -9,7 +9,7 @@
 
   $ cat << EOF >> $HGRCPATH
   > [format]
-  > dirstate-tracked-key=yes
+  > use-dirstate-tracked-key=yes
   > EOF
 
   $ hg init tracked-key-test
@@ -172,7 +172,7 @@
 
 downgrade
 
-  $ hg debugupgraderepo --config format.dirstate-tracked-key=no --run --quiet
+  $ hg debugupgraderepo --config format.use-dirstate-tracked-key=no --run --quiet
   upgrade will perform the following actions:
   
   requirements
@@ -189,7 +189,7 @@
 
 upgrade
 
-  $ hg debugupgraderepo --config format.dirstate-tracked-key=yes --run --quiet
+  $ hg debugupgraderepo --config format.use-dirstate-tracked-key=yes --run --quiet
   upgrade will perform the following actions:
   
   requirements