Mercurial > hg
changeset 27182:71aa5a26162d
hgweb: make sure command options are set to all ui objects
Before this patch, it was unclear why the httpservice object could read the
server options (e.g. --port) from 'ui'. It just worked because repo.ui is ui.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 21 Nov 2015 13:28:12 +0900 |
parents | a9cecc7b68d3 |
children | 0945539a3a6b |
files | mercurial/hgweb/__init__.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/__init__.py Sat Oct 31 22:26:50 2015 +0900 +++ b/mercurial/hgweb/__init__.py Sat Nov 21 13:28:12 2015 +0900 @@ -90,8 +90,10 @@ if opts.get('port'): opts['port'] = util.getport(opts.get('port')) + alluis = set([ui]) if repo: baseui = repo.baseui + alluis.update([repo.baseui, repo.ui]) else: baseui = ui optlist = ("name templates style address port prefix ipv6" @@ -100,9 +102,8 @@ val = opts.get(o, '') if val in (None, ''): # should check against default options instead continue - baseui.setconfig("web", o, val, 'serve') - if repo and repo.ui != baseui: - repo.ui.setconfig("web", o, val, 'serve') + for u in alluis: + u.setconfig("web", o, val, 'serve') webconf = opts.get('web_conf') or opts.get('webdir_conf') if webconf: