Mercurial > hg
changeset 4078:ff08cebcd116
hg serve: call setconfig on the parentui
It makes sense to do this on the "global" ui object, since command line
options should affect the whole process.
This should fix hg serve --style=gitweb inside a repo (part of issue253).
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 13 Feb 2007 10:00:17 -0200 |
parents | 1305ba7dee88 |
children | 40c9710e8182 |
files | mercurial/commands.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Jan 30 10:35:25 2007 -0500 +++ b/mercurial/commands.py Tue Feb 13 10:00:17 2007 -0200 @@ -2304,11 +2304,12 @@ s = sshserver.sshserver(ui, repo) s.serve_forever() + parentui = ui.parentui or ui optlist = ("name templates style address port ipv6" " accesslog errorlog webdir_conf") for o in optlist.split(): if opts[o]: - ui.setconfig("web", o, str(opts[o])) + parentui.setconfig("web", o, str(opts[o])) if repo is None and not ui.config("web", "webdir_conf"): raise hg.RepoError(_("There is no Mercurial repository here" @@ -2324,7 +2325,7 @@ os.read(rfd, 1) os._exit(0) - httpd = hgweb.server.create_server(ui, repo) + httpd = hgweb.server.create_server(parentui, repo) if ui.verbose: if httpd.port != 80: