changeset 39298:7a9f15ed3b96

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.
author Boris Feld <boris.feld@octobus.net>
date Thu, 24 May 2018 09:59:10 +0200
parents 06c976acc581
children 7775c1fb8fa0
files mercurial/configitems.py mercurial/localrepo.py
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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