diff mercurial/hgweb/server.py @ 4866:9858477ed74c

serve: respect settings from .hg/hgrc create_server was looking only at the root ui object, ignoring any settings from .hg/hgrc. To keep respecting command-line arguments, commands.serve must also call repo.ui.setconfig.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Wed, 11 Jul 2007 19:56:16 -0300
parents 63b9d2deed48
children 192cd95c2ba8 f94dbc6c7eaf
line wrap: on
line diff
--- a/mercurial/hgweb/server.py
+++ b/mercurial/hgweb/server.py
@@ -172,12 +172,12 @@ def create_server(ui, repo):
             return open(opt, 'w')
         return default
 
-    address = ui.config("web", "address", "")
-    port = int(ui.config("web", "port", 8000))
-    use_ipv6 = ui.configbool("web", "ipv6")
-    webdir_conf = ui.config("web", "webdir_conf")
-    accesslog = openlog(ui.config("web", "accesslog", "-"), sys.stdout)
-    errorlog = openlog(ui.config("web", "errorlog", "-"), sys.stderr)
+    address = repo.ui.config("web", "address", "")
+    port = int(repo.ui.config("web", "port", 8000))
+    use_ipv6 = repo.ui.configbool("web", "ipv6")
+    webdir_conf = repo.ui.config("web", "webdir_conf")
+    accesslog = openlog(repo.ui.config("web", "accesslog", "-"), sys.stdout)
+    errorlog = openlog(repo.ui.config("web", "errorlog", "-"), sys.stderr)
 
     if use_threads:
         try: