##// END OF EJS Templates
serve: fix options recording, trailing whitespace
Benoit Boissinot -
r10630:9947e6b0 default
parent child Browse files
Show More
@@ -2885,13 +2885,12 b' def serve(ui, repo, **opts):'
2885 optlist = ("name templates style address port prefix ipv6"
2885 optlist = ("name templates style address port prefix ipv6"
2886 " accesslog errorlog webdir_conf certificate encoding")
2886 " accesslog errorlog webdir_conf certificate encoding")
2887 for o in optlist.split():
2887 for o in optlist.split():
2888 try: val = opts[o]
2888 val = opts.get(o, '')
2889 except KeyError: continue
2889 if val is None or val == '': # should check against default options instead
2890 else:
2890 continue
2891 if val == '': continue
2891 baseui.setconfig("web", o, val)
2892 baseui.setconfig("web", o, val)
2892 if repo and repo.ui != baseui:
2893 if repo and repo.ui != baseui:
2893 repo.ui.setconfig("web", o, val)
2894 repo.ui.setconfig("web", o, val)
2895
2894
2896 if repo is None and not ui.config("web", "webdir_conf"):
2895 if repo is None and not ui.config("web", "webdir_conf"):
2897 raise error.RepoError(_("There is no Mercurial repository here"
2896 raise error.RepoError(_("There is no Mercurial repository here"
@@ -2924,7 +2923,7 b' def serve(ui, repo, **opts):'
2924 if ':' in fqaddr:
2923 if ':' in fqaddr:
2925 fqaddr = '[%s]' % fqaddr
2924 fqaddr = '[%s]' % fqaddr
2926 if opts['port']:
2925 if opts['port']:
2927 write = ui.status
2926 write = ui.status
2928 else:
2927 else:
2929 write = ui.write
2928 write = ui.write
2930 write(_('listening at http://%s%s/%s (bound to %s:%d)\n') %
2929 write(_('listening at http://%s%s/%s (bound to %s:%d)\n') %
General Comments 0
You need to be logged in to leave comments. Login now