Patchwork [4,of,8] configitems: register 'ui.quiet' as first example

login
register
mail settings
Submitter Pierre-Yves David
Date June 21, 2017, 8:55 a.m.
Message ID <c718cdbf2b211faec192.1498035305@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21588/
State Accepted
Headers show

Comments

Pierre-Yves David - June 21, 2017, 8:55 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1497695639 -7200
#      Sat Jun 17 12:33:59 2017 +0200
# Node ID c718cdbf2b211faec1925a3728af5aedd7b9a69a
# Parent  a9ce5ac5b1ece7edbf8fb7382d6104516c4a590a
# EXP-Topic config.register
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r c718cdbf2b21
configitems: register 'ui.quiet' as first example

We now have a user and this works fine.

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -33,3 +33,9 @@  def coreconfigitem(*args, **kwargs):
         msg = "duplicated config item registration for '%s.%s'"
         raise error.ProgrammingError(msg % (item.section, item.name))
     section[item.name] = item
+
+# Registering actual config items
+
+coreconfigitem('ui', 'quiet',
+    default=False,
+)