phase: rename the requirement for internal-phase (BC)
The previous requirements covers both `internal` and `archived` phase. However,
the `archived` phase is not ready for usage (while the internal one is mostly
ready for years). So we split the archived on in a dedicated requirements (see
previous changeset for details) and rename the one for internal-phase. This will
avoid older client trying to use the archived phase on `internal` only
repositories.
Since the requirements stayed experimental since its introduction. It seems
fine to drop the previous version.
--- a/mercurial/configitems.py Tue Aug 16 19:04:23 2022 +0200
+++ b/mercurial/configitems.py Tue Aug 16 20:09:31 2022 +0200
@@ -1425,9 +1425,12 @@
default=False,
experimental=True,
)
+
+# Moving this on by default means we are confident about the scaling of phases.
+# This is not garanteed to be the case at the time this message is written.
coreconfigitem(
b'format',
- b'internal-phase',
+ b'use-internal-phase',
default=False,
experimental=True,
)
--- a/mercurial/localrepo.py Tue Aug 16 19:04:23 2022 +0200
+++ b/mercurial/localrepo.py Tue Aug 16 20:09:31 2022 +0200
@@ -3662,7 +3662,7 @@
requirements.discard(requirementsmod.REVLOGV1_REQUIREMENT)
requirements.add(requirementsmod.REVLOGV2_REQUIREMENT)
# experimental config: format.internal-phase
- if ui.configbool(b'format', b'internal-phase'):
+ if ui.configbool(b'format', b'use-internal-phase'):
requirements.add(requirementsmod.INTERNAL_PHASE_REQUIREMENT)
# experimental config: format.exp-archived-phase
--- a/mercurial/requirements.py Tue Aug 16 19:04:23 2022 +0200
+++ b/mercurial/requirements.py Tue Aug 16 20:09:31 2022 +0200
@@ -29,7 +29,7 @@
# Enables the internal phase which is used to hide changesets instead
# of stripping them
-INTERNAL_PHASE_REQUIREMENT = b'internal-phase'
+INTERNAL_PHASE_REQUIREMENT = b'internal-phase-2'
# Enables the internal phase which is used to hide changesets instead
# of stripping them
--- a/tests/test-phases.t Tue Aug 16 19:04:23 2022 +0200
+++ b/tests/test-phases.t Tue Aug 16 20:09:31 2022 +0200
@@ -879,7 +879,7 @@
Check we deny its usage on older repository
- $ hg init no-internal-phase --config format.internal-phase=no
+ $ hg init no-internal-phase --config format.use-internal-phase=no
$ cd no-internal-phase
$ hg debugrequires | grep internal-phase
[1]
@@ -900,10 +900,10 @@
Check it works fine with repository that supports it.
- $ hg init internal-phase --config format.internal-phase=yes
+ $ hg init internal-phase --config format.use-internal-phase=yes
$ cd internal-phase
$ hg debugrequires | grep internal-phase
- internal-phase
+ internal-phase-2
$ mkcommit A
test-debug-phase: new rev 0: x -> 1
test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft
--- a/tests/test-shelve.t Tue Aug 16 19:04:23 2022 +0200
+++ b/tests/test-shelve.t Tue Aug 16 20:09:31 2022 +0200
@@ -14,7 +14,7 @@
$ cat <<EOF >> $HGRCPATH
> [format]
- > internal-phase = yes
+ > use-internal-phase = yes
> EOF
#endif
--- a/tests/test-shelve2.t Tue Aug 16 19:04:23 2022 +0200
+++ b/tests/test-shelve2.t Tue Aug 16 20:09:31 2022 +0200
@@ -16,7 +16,7 @@
$ cat <<EOF >> $HGRCPATH
> [format]
- > internal-phase = yes
+ > use-internal-phase = yes
> EOF
#endif