phases: add a repository requirement about internal phase
authorBoris Feld <boris.feld@octobus.net>
Thu, 24 May 2018 09:59:10 +0200
changeset 39298 7a9f15ed3b96
parent 39297 06c976acc581
child 39299 7775c1fb8fa0
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.
mercurial/configitems.py
mercurial/localrepo.py
--- 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