acl: use configlist to retrieve the source config
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 01 Jul 2017 20:58:34 +0200
changeset 33187 2b233065f57a
parent 33186 478cb17cc610
child 33188 54bc88c56ec8
acl: use configlist to retrieve the source config This is what the previous code was about.
hgext/acl.py
--- a/hgext/acl.py	Fri Jun 30 03:27:07 2017 +0200
+++ b/hgext/acl.py	Sat Jul 01 20:58:34 2017 +0200
@@ -219,7 +219,7 @@
     default=None,
 )
 configitem('acl', 'sources',
-    default='serve',
+    default=['serve'],
 )
 
 def _getusers(ui, group):
@@ -292,7 +292,7 @@
         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