Mercurial > hg > mercurial-source
changeset 35370:b50c036494dc
configitems: register the 'web.motd' config
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 11 Oct 2017 03:36:44 +0200 |
parents | c364f3f73634 |
children | 0d9928a67254 |
files | mercurial/configitems.py mercurial/hgweb/hgweb_mod.py mercurial/hgweb/hgwebdir_mod.py |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -730,6 +730,9 @@ coreconfigitem('web', 'ipv6', default=False, ) +coreconfigitem('web', 'motd', + default='', +) coreconfigitem('web', 'name', default=dynamicdefault, )
--- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -177,7 +177,7 @@ # some functions for the templater def motd(**map): - yield self.config('web', 'motd', '') + yield self.config('web', 'motd') # figure out which style to use
--- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -491,7 +491,7 @@ if self.motd is not None: yield self.motd else: - yield config('web', 'motd', '') + yield config('web', 'motd') def config(section, name, default=uimod._unset, untrusted=True): return self.ui.config(section, name, default, untrusted)