Patchwork [11,of,17] configitems: register the 'format.obsstore-version' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 4, 2017, 11:10 p.m.
Message ID <7d806bc023248307ba9b.1499209839@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21986/
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 1498786947 -7200
#      Fri Jun 30 03:42:27 2017 +0200
# Node ID 7d806bc023248307ba9b5d39cf640cf84bc680a2
# Parent  7b1e558486117974d26fedd5748c6ab9908af9f4
# 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 7d806bc02324
configitems: register the 'format.obsstore-version' config

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -122,6 +122,9 @@  coreconfigitem('format', 'manifestcaches
 coreconfigitem('format', 'maxchainlen',
     default=None,
 )
+coreconfigitem('format', 'obsstore-version',
+    default=None,
+)
 coreconfigitem('hostsecurity', 'ciphers',
     default=None,
 )
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -717,7 +717,7 @@  def makestore(ui, repo):
     """Create an obsstore instance from a repo."""
     # read default format for new obsstore.
     # developer config: format.obsstore-version
-    defaultformat = ui.configint('format', 'obsstore-version', None)
+    defaultformat = ui.configint('format', 'obsstore-version')
     # rely on obsstore class default when possible.
     kwargs = {}
     if defaultformat is not None: