Mercurial > hg-stable
changeset 5086:86cd6fd61042
unobfuscate part of f94dbc6c7eaf
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Thu, 09 Aug 2007 01:04:27 +0200 |
parents | dcfd75502b82 |
children | b3cc62268a91 c13610d5642c ff461baa9c4e |
files | mercurial/hgweb/server.py |
diffstat | 1 files changed, 8 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/server.py Wed Aug 08 22:47:18 2007 +0200 +++ b/mercurial/hgweb/server.py Thu Aug 09 01:04:27 2007 +0200 @@ -172,28 +172,16 @@ return open(opt, 'w') return default - def create_getconfig(section, *uis): # uis are least significant to most - def getconfig(var, default=None): - val = default - for u in uis: - val = u.config(section, var, val) - return val - def getconfigbool(var, default=None): - val = default - for u in uis: - val = u.configbool(section, var, val) - return (getconfig, getconfigbool) - if repo is None: - getconfig, getconfigbool = create_getconfig("web", ui) + myui = ui else: - getconfig, getconfigbool = create_getconfig("web", ui, repo.ui) - address = getconfig("address", "") - port = int(getconfig("port", 8000)) - use_ipv6 = getconfigbool("ipv6") - webdir_conf = getconfig("webdir_conf") - accesslog = openlog(getconfig("accesslog", "-"), sys.stdout) - errorlog = openlog(getconfig("errorlog", "-"), sys.stderr) + myui = repo.ui + address = myui.config("web", "address", "") + port = int(myui.config("web", "port", 8000)) + use_ipv6 = myui.configbool("web", "ipv6") + webdir_conf = myui.config("web", "webdir_conf") + accesslog = openlog(myui.config("web", "accesslog", "-"), sys.stdout) + errorlog = openlog(myui.config("web", "errorlog", "-"), sys.stderr) if use_threads: try: