# HG changeset patch # User Dirkjan Ochtman # Date 2009-06-21 14:27:07 # Node ID c3e4d3c1d48b1c3af1266ca3a0be213854bc1ed6 # Parent d244ee52ac30c4f8b557140616f992d8726780e8 serve: obey the --encoding option diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2721,9 +2721,9 @@ def serve(ui, repo, **opts): baseui = repo and repo.baseui or ui optlist = ("name templates style address port prefix ipv6" - " accesslog errorlog webdir_conf certificate") + " accesslog errorlog webdir_conf certificate encoding") for o in optlist.split(): - if opts[o]: + if opts.get(o, None): baseui.setconfig("web", o, str(opts[o])) if (repo is not None) and (repo.ui != baseui): repo.ui.setconfig("web", o, str(opts[o]))