comparison mercurial/hgweb/server.py @ 4868:192cd95c2ba8

merge with crew-stable
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Wed, 11 Jul 2007 20:15:03 -0300
parents f3802f9f1840 9858477ed74c
children 8f430b1b3025
comparison
equal deleted inserted replaced
4867:8be7ba425621 4868:192cd95c2ba8
195 def openlog(opt, default): 195 def openlog(opt, default):
196 if opt and opt != '-': 196 if opt and opt != '-':
197 return open(opt, 'w') 197 return open(opt, 'w')
198 return default 198 return default
199 199
200 address = ui.config("web", "address", "") 200 address = repo.ui.config("web", "address", "")
201 port = int(ui.config("web", "port", 8000)) 201 port = int(repo.ui.config("web", "port", 8000))
202 use_ipv6 = ui.configbool("web", "ipv6") 202 use_ipv6 = repo.ui.configbool("web", "ipv6")
203 webdir_conf = ui.config("web", "webdir_conf") 203 webdir_conf = repo.ui.config("web", "webdir_conf")
204 ssl_cert = ui.config("web", "certificate") 204 ssl_cert = repo.ui.config("web", "certificate")
205 accesslog = openlog(ui.config("web", "accesslog", "-"), sys.stdout) 205 accesslog = openlog(repo.ui.config("web", "accesslog", "-"), sys.stdout)
206 errorlog = openlog(ui.config("web", "errorlog", "-"), sys.stderr) 206 errorlog = openlog(repo.ui.config("web", "errorlog", "-"), sys.stderr)
207 207
208 if use_threads: 208 if use_threads:
209 try: 209 try:
210 from threading import activeCount 210 from threading import activeCount
211 except ImportError: 211 except ImportError: