Make "[web] allow_push, deny_push" and "[http_proxy] no" use ui.configlist.
authorThomas Arendsen Hein <thomas@intevation.de>
Mon, 26 Jun 2006 16:47:24 +0200
changeset 2501 b73552a00b20
parent 2500 76ff5efe8181
child 2502 18cf95ad3666
child 2560 c35694df7b13
Make "[web] allow_push, deny_push" and "[http_proxy] no" use ui.configlist.
mercurial/hgweb/hgweb_mod.py
mercurial/httprepo.py
--- a/mercurial/hgweb/hgweb_mod.py	Mon Jun 26 14:56:14 2006 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Mon Jun 26 16:47:24 2006 +0200
@@ -845,15 +845,11 @@
 
         user = req.env.get('REMOTE_USER')
 
-        deny = self.repo.ui.config('web', 'deny_' + op, '')
-        deny = deny.replace(',', ' ').split()
-
+        deny = self.repo.ui.configlist('web', 'deny_' + op)
         if deny and (not user or deny == ['*'] or user in deny):
             return False
 
-        allow = self.repo.ui.config('web', 'allow_' + op, '')
-        allow = allow.replace(',', ' ').split()
-
+        allow = self.repo.ui.configlist('web', 'allow_' + op)
         return (allow and (allow == ['*'] or user in allow)) or default
 
     def do_unbundle(self, req):
--- a/mercurial/httprepo.py	Mon Jun 26 14:56:14 2006 +0200
+++ b/mercurial/httprepo.py	Mon Jun 26 16:47:24 2006 +0200
@@ -120,9 +120,8 @@
 
             # see if we should use a proxy for this url
             no_list = [ "localhost", "127.0.0.1" ]
-            no_list.extend([p.strip().lower() for
-                            p in ui.config("http_proxy", "no", '').split(',')
-                            if p.strip()])
+            no_list.extend([p.lower() for
+                            p in ui.configlist("http_proxy", "no")])
             no_list.extend([p.strip().lower() for
                             p in os.getenv("no_proxy", '').split(',')
                             if p.strip()])