configitems: register the 'format.generaldelta' config
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 30 Jun 2017 03:42:23 +0200
changeset 33238 784f2bd96d43
parent 33237 7043e67cc9b2
child 33239 a4f6dee1b9f1
configitems: register the 'format.generaldelta' config
mercurial/configitems.py
mercurial/scmutil.py
--- a/mercurial/configitems.py	Fri Jun 30 03:42:22 2017 +0200
+++ b/mercurial/configitems.py	Fri Jun 30 03:42:23 2017 +0200
@@ -113,6 +113,9 @@
 coreconfigitem('format', 'dotencode',
     default=True,
 )
+coreconfigitem('format', 'generaldelta',
+    default=False,
+)
 coreconfigitem('hostsecurity', 'ciphers',
     default=None,
 )
--- a/mercurial/scmutil.py	Fri Jun 30 03:42:22 2017 +0200
+++ b/mercurial/scmutil.py	Fri Jun 30 03:42:23 2017 +0200
@@ -982,14 +982,14 @@
     """helper function to know if a repo should be created as general delta
     """
     # experimental config: format.generaldelta
-    return (ui.configbool('format', 'generaldelta', False)
+    return (ui.configbool('format', 'generaldelta')
             or ui.configbool('format', 'usegeneraldelta', True))
 
 def gddeltaconfig(ui):
     """helper function to know if incoming delta should be optimised
     """
     # experimental config: format.generaldelta
-    return ui.configbool('format', 'generaldelta', False)
+    return ui.configbool('format', 'generaldelta')
 
 class simplekeyvaluefile(object):
     """A simple file with key=value lines