D6728: config: add experimental argument to the config registrar

navaneeth.suresh (Navaneeth Suresh) phabricator at mercurial-scm.org
Thu Aug 15 10:22:51 EDT 2019


navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Until now, there are almost 28 config items which are considered as
  `experimental` but, not present in the `experimental` section of
  the registrar. This patch adds an `experimental` argument to the
  config registrar to mark such config items.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6728

AFFECTED FILES
  contrib/perf.py
  hgext/fsmonitor/__init__.py
  hgext/remotefilelog/__init__.py
  hgext/sqlitestore.py
  mercurial/configitems.py

CHANGE DETAILS

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -39,13 +39,14 @@
     """
 
     def __init__(self, section, name, default=None, alias=(),
-                 generic=False, priority=0):
+                 generic=False, priority=0, experimental=False):
         self.section = section
         self.name = name
         self.default = default
         self.alias = list(alias)
         self.generic = generic
         self.priority = priority
+        self.experimental = experimental
         self._re = None
         if generic:
             self._re = re.compile(self.name)
@@ -166,6 +167,7 @@
 )
 coreconfigitem('censor', 'policy',
     default='abort',
+    experimental=True,
 )
 coreconfigitem('chgserver', 'idletimeout',
     default=3600,
@@ -184,9 +186,11 @@
 )
 coreconfigitem('cmdserver', 'max-repo-cache',
     default=0,
+    experimental=True,
 )
 coreconfigitem('cmdserver', 'message-encodings',
     default=list,
+    experimental=True,
 )
 coreconfigitem('cmdserver', 'track-log',
     default=lambda: ['chgserver', 'cmdserver', 'repocache'],
@@ -207,6 +211,7 @@
 )
 coreconfigitem('commands', 'grep.all-files',
     default=False,
+    experimental=True,
 )
 coreconfigitem('commands', 'resolve.confirm',
     default=False,
@@ -226,6 +231,7 @@
 )
 coreconfigitem('commands', 'status.skipstates',
     default=[],
+    experimental=True,
 )
 coreconfigitem('commands', 'status.terse',
     default='',
@@ -314,6 +320,7 @@
 )
 coreconfigitem('convert', 'ignoreancestorcheck',
     default=False,
+    experimental=True,
 )
 coreconfigitem('convert', 'localtimezone',
     default=False,
@@ -684,18 +691,22 @@
 )
 coreconfigitem('format', 'chunkcachesize',
     default=None,
+    experimental=True,
 )
 coreconfigitem('format', 'dotencode',
     default=True,
 )
 coreconfigitem('format', 'generaldelta',
     default=False,
+    experimental=True,
 )
 coreconfigitem('format', 'manifestcachesize',
     default=None,
+    experimental=True,
 )
 coreconfigitem('format', 'maxchainlen',
     default=dynamicdefault,
+    experimental=True,
 )
 coreconfigitem('format', 'obsstore-version',
     default=None,
@@ -718,6 +729,7 @@
 )
 coreconfigitem('format', 'internal-phase',
     default=False,
+    experimental=True,
 )
 coreconfigitem('fsmonitor', 'warn_when_unused',
     default=True,
@@ -823,6 +835,7 @@
 )
 coreconfigitem('merge', 'preferancestor',
         default=lambda: ['*'],
+        experimental=True,
 )
 coreconfigitem('merge', 'strict-capability-check',
     default=False,
@@ -1007,6 +1020,7 @@
 )
 coreconfigitem('storage', 'new-repo-backend',
     default='revlogv1',
+    experimental=True,
 )
 coreconfigitem('storage', 'revlog.optimize-delta-parent-choice',
     default=True,
@@ -1117,6 +1131,7 @@
 )
 coreconfigitem('sparse', 'missingwarning',
     default=True,
+    experimental=True,
 )
 coreconfigitem('subrepos', 'allowed',
     default=dynamicdefault,  # to make backporting simpler
@@ -1463,6 +1478,7 @@
 )
 coreconfigitem('web', 'view',
     default='served',
+    experimental=True,
 )
 coreconfigitem('worker', 'backgroundclose',
     default=dynamicdefault,
diff --git a/hgext/sqlitestore.py b/hgext/sqlitestore.py
--- a/hgext/sqlitestore.py
+++ b/hgext/sqlitestore.py
@@ -90,7 +90,8 @@
 
 # experimental config: storage.sqlite.compression
 configitem('storage', 'sqlite.compression',
-           default='zstd' if zstd else 'zlib')
+           default='zstd' if zstd else 'zlib',
+           experimental=True)
 
 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py
+++ b/hgext/remotefilelog/__init__.py
@@ -219,7 +219,7 @@
 
 configitem('remotefilelog', 'gcrepack', default=False)
 configitem('remotefilelog', 'repackonhggc', default=False)
-configitem('repack', 'chainorphansbysize', default=True)
+configitem('repack', 'chainorphansbysize', default=True, experimental=True)
 
 configitem('packs', 'maxpacksize', default=0)
 configitem('packs', 'maxchainlen', default=1000)
diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ b/hgext/fsmonitor/__init__.py
@@ -167,6 +167,7 @@
 )
 configitem('fsmonitor', 'verbose',
     default=True,
+    experimental=True,
 )
 configitem('experimental', 'fsmonitor.transaction_notify',
     default=False,
diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -241,15 +241,19 @@
     configitem = mercurial.registrar.configitem(configtable)
     configitem(b'perf', b'presleep',
         default=mercurial.configitems.dynamicdefault,
+        experimental=True,
     )
     configitem(b'perf', b'stub',
         default=mercurial.configitems.dynamicdefault,
+        experimental=True,
     )
     configitem(b'perf', b'parentscount',
         default=mercurial.configitems.dynamicdefault,
+        experimental=True,
     )
     configitem(b'perf', b'all-timing',
         default=mercurial.configitems.dynamicdefault,
+        experimental=True,
     )
     configitem(b'perf', b'pre-run',
         default=mercurial.configitems.dynamicdefault,
@@ -259,6 +263,7 @@
     )
     configitem(b'perf', b'run-limits',
         default=mercurial.configitems.dynamicdefault,
+        experimental=True,
     )
 except (ImportError, AttributeError):
     pass



To: navaneeth.suresh, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list