Patchwork [09,of,18] configitems: register the 'acl.config' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 2:57 a.m.
Message ID <c1664a0daf3c302ff04c.1498964257@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21900/
State Accepted
Headers show

Comments

Pierre-Yves David - July 2, 2017, 2:57 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498786017 -7200
#      Fri Jun 30 03:26:57 2017 +0200
# Node ID c1664a0daf3c302ff04c5c8eded0b3eb0c14e3e0
# Parent  6d678ab1b10d0fddc73003d21aa3c7ec43194e2e
# EXP-Topic config.register.acl
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r c1664a0daf3c
configitems: register the 'acl.config' config

Patch

diff --git a/hgext/acl.py b/hgext/acl.py
--- a/hgext/acl.py
+++ b/hgext/acl.py
@@ -199,6 +199,7 @@  from mercurial.i18n import _
 from mercurial import (
     error,
     match,
+    registrar,
     util,
 )
 
@@ -210,6 +211,14 @@  urlreq = util.urlreq
 # leave the attribute unspecified.
 testedwith = 'ships-with-hg-core'
 
+configtable = {}
+configitem = registrar.configitem(configtable)
+
+# deprecated config: acl.config
+configitem('acl', 'config',
+    default=None,
+)
+
 def _getusers(ui, group):
 
     # First, try to use group definition from section [acl.groups]