[Request] [+- ] D12200: tracked-file: rename the format option to use `use-`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Feb 17 10:26:32 UTC 2022
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This is more consistent with the other options.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D12200
AFFECTED FILES
mercurial/configitems.py
mercurial/helptext/config.txt
mercurial/localrepo.py
tests/test-help.t
tests/test-status-tracked-key.t
CHANGE DETAILS
diff --git a/tests/test-status-tracked-key.t b/tests/test-status-tracked-key.t
--- a/tests/test-status-tracked-key.t
+++ b/tests/test-status-tracked-key.t
@@ -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
diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -1599,7 +1599,7 @@
"use-dirstate-v2"
- "dirstate-tracked-key"
+ "use-dirstate-tracked-key"
"use-persistent-nodemap"
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -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:
diff --git a/mercurial/helptext/config.txt b/mercurial/helptext/config.txt
--- a/mercurial/helptext/config.txt
+++ b/mercurial/helptext/config.txt
@@ -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)
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -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,
)
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20220217/eb1276d8/attachment.html>
More information about the Mercurial-patches
mailing list