diff -r 8e7db961535a -r a9cecc7b68d3 mercurial/hgweb/__init__.py --- a/mercurial/hgweb/__init__.py Tue Dec 01 16:06:20 2015 -0800 +++ b/mercurial/hgweb/__init__.py Sat Oct 31 22:26:50 2015 +0900 @@ -104,12 +104,12 @@ if repo and repo.ui != baseui: repo.ui.setconfig("web", o, val, 'serve') - o = opts.get('web_conf') or opts.get('webdir_conf') - if not o: + webconf = opts.get('web_conf') or opts.get('webdir_conf') + if webconf: + app = hgwebdir_mod.hgwebdir(webconf, baseui=baseui) + else: if not repo: raise error.RepoError(_("there is no Mercurial repository" " here (.hg not found)")) - o = repo - - app = hgweb(o, baseui=baseui) + app = hgweb_mod.hgweb(repo, baseui=baseui) return httpservice(ui, app, opts)