Do not overwrite motd attribute of hgwebdir instances on refresh.
This allows using
application = hgwebdir(...)
application.motd = (string or object with __str__ method)
in WSGI (like it is possible in CGI).
Changed web.motd in the config file is still read with this, because
hgwebdir.templater.motd() does not store the config value.
--- a/mercurial/hgweb/hgwebdir_mod.py Thu Nov 19 11:06:01 2009 +0900
+++ b/mercurial/hgweb/hgwebdir_mod.py Sun Nov 22 11:25:01 2009 +0100
@@ -48,6 +48,7 @@
self.conf = conf
self.baseui = baseui
self.lastrefresh = 0
+ self.motd = None
self.refresh()
def refresh(self):
@@ -72,7 +73,6 @@
encoding.encoding = self.ui.config('web', 'encoding',
encoding.encoding)
- self.motd = self.ui.config('web', 'motd')
self.style = self.ui.config('web', 'style', 'paper')
self.stripecount = self.ui.config('web', 'stripes', 1)
if self.stripecount: