Patchwork [05,of,17] configitems: register the 'format.generaldelta' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 4, 2017, 11:10 p.m.
Message ID <146bc475ac03ff05320e.1499209833@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21978/
State Accepted
Headers show

Comments

Pierre-Yves David - July 4, 2017, 11:10 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498786943 -7200
#      Fri Jun 30 03:42:23 2017 +0200
# Node ID 146bc475ac03ff05320e834f891b49ca5a224f6f
# Parent  11709316c2514e6f4be4a15e070f057b8568d125
# EXP-Topic config.register.format
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 146bc475ac03
configitems: register the 'format.generaldelta' config

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -113,6 +113,9 @@  coreconfigitem('format', 'chunkcachesize
 coreconfigitem('format', 'dotencode',
     default=True,
 )
+coreconfigitem('format', 'generaldelta',
+    default=False,
+)
 coreconfigitem('hostsecurity', 'ciphers',
     default=None,
 )
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -982,14 +982,14 @@  def gdinitconfig(ui):
     """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