# HG changeset patch # User Thomas Arendsen Hein # Date 1258885501 -3600 # Node ID 5d748045c2aed9f9b74799c78dcbb6bdbec38657 # Parent 8939900073a8864482daba22ff641a5be65610d2 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. diff -r 8939900073a8 -r 5d748045c2ae mercurial/hgweb/hgwebdir_mod.py --- 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: