# HG changeset patch # User Yuya Nishihara # Date 1448080092 -32400 # Node ID 71aa5a26162d6e4a165b68f07b331e3e2eedc117 # Parent a9cecc7b68d377badf83c4e6b0f4bcd6a33010a3 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. diff -r a9cecc7b68d3 -r 71aa5a26162d mercurial/hgweb/__init__.py --- 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: