[PATCH 11 of 18] acl: use configlist to retrieve the source config

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sat Jul 1 22:57:39 EDT 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1498935514 -7200
#      Sat Jul 01 20:58:34 2017 +0200
# Node ID c56f424d79532d24531612e5c9550d3f62922ab1
# Parent  9092748ab0a571304ac58163ed1e570b06e0bf9d
# 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 c56f424d7953
acl: use configlist to retrieve the source config

This is what the previous code was about.

diff --git a/hgext/acl.py b/hgext/acl.py
--- a/hgext/acl.py
+++ b/hgext/acl.py
@@ -219,7 +219,7 @@ configitem('acl', 'config',
     default=None,
 )
 configitem('acl', 'sources',
-    default='serve',
+    default=['serve'],
 )
 
 def _getusers(ui, group):
@@ -292,7 +292,7 @@ def hook(ui, repo, hooktype, node=None, 
         raise error.Abort(_('config error - hook type "%s" cannot stop '
                            'incoming changesets nor commits') % hooktype)
     if (hooktype == 'pretxnchangegroup' and
-        source not in ui.config('acl', 'sources').split()):
+        source not in ui.configlist('acl', 'sources')):
         ui.debug('acl: changes have source "%s" - skipping\n' % source)
         return
 


More information about the Mercurial-devel mailing list