phases: add a repository requirement about internal phase
For internal changeset to be properly hidden, the client version needs to
support it. So we introduce a new repository requirement that will make sure
clients touching a repository that uses internal phase supports the feature.
--- a/mercurial/configitems.py Sat Aug 25 01:19:48 2018 +0200
+++ b/mercurial/configitems.py Thu May 24 09:59:10 2018 +0200
@@ -679,6 +679,9 @@
coreconfigitem('format', 'usestore',
default=True,
)
+coreconfigitem('format', 'internal-phase',
+ default=False,
+)
coreconfigitem('fsmonitor', 'warn_when_unused',
default=True,
)
--- a/mercurial/localrepo.py Sat Aug 25 01:19:48 2018 +0200
+++ b/mercurial/localrepo.py Thu May 24 09:59:10 2018 +0200
@@ -394,6 +394,7 @@
'relshared',
'dotencode',
'exp-sparse',
+ 'internal-phase'
}
openerreqs = {
'revlogv1',
@@ -2427,5 +2428,8 @@
# generaldelta is implied by revlogv2.
requirements.discard('generaldelta')
requirements.add(REVLOGV2_REQUIREMENT)
+ # experimental config: format.internal-phase
+ if repo.ui.configbool('format', 'internal-phase'):
+ requirements.add('internal-phase')
return requirements