serve: obey the --encoding option
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Sun, 21 Jun 2009 16:27:07 +0200
changeset 8870 c3e4d3c1d48b
parent 8869 d244ee52ac30
child 8871 20a25042fadc
serve: obey the --encoding option
mercurial/commands.py
--- a/mercurial/commands.py	Sat Jun 20 16:06:55 2009 +0200
+++ b/mercurial/commands.py	Sun Jun 21 16:27:07 2009 +0200
@@ -2721,9 +2721,9 @@
 
     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]))