Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/server.py @ 4835: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 |
comparison
equal
deleted
inserted
replaced
4834:439e2f2fde42 | 4835:9858477ed74c |
---|---|
170 def openlog(opt, default): | 170 def openlog(opt, default): |
171 if opt and opt != '-': | 171 if opt and opt != '-': |
172 return open(opt, 'w') | 172 return open(opt, 'w') |
173 return default | 173 return default |
174 | 174 |
175 address = ui.config("web", "address", "") | 175 address = repo.ui.config("web", "address", "") |
176 port = int(ui.config("web", "port", 8000)) | 176 port = int(repo.ui.config("web", "port", 8000)) |
177 use_ipv6 = ui.configbool("web", "ipv6") | 177 use_ipv6 = repo.ui.configbool("web", "ipv6") |
178 webdir_conf = ui.config("web", "webdir_conf") | 178 webdir_conf = repo.ui.config("web", "webdir_conf") |
179 accesslog = openlog(ui.config("web", "accesslog", "-"), sys.stdout) | 179 accesslog = openlog(repo.ui.config("web", "accesslog", "-"), sys.stdout) |
180 errorlog = openlog(ui.config("web", "errorlog", "-"), sys.stderr) | 180 errorlog = openlog(repo.ui.config("web", "errorlog", "-"), sys.stderr) |
181 | 181 |
182 if use_threads: | 182 if use_threads: |
183 try: | 183 try: |
184 from threading import activeCount | 184 from threading import activeCount |
185 except ImportError: | 185 except ImportError: |