Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/hgweb_mod.py @ 26149:fd9b1262f0e4
hgweb: initialize repostate to None
The initial value is irrelevant since refresh() compares it to
a tuple of tuples of file mtime and size. None != tuple and
None is a better default value than a tuple containing irrelevant
values.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 22 Aug 2015 15:21:45 -0700 |
parents | f77a3f27cea5 |
children | 952e0564b46e |
comparison
equal
deleted
inserted
replaced
26148:7f49efcaa9b4 | 26149:fd9b1262f0e4 |
---|---|
154 # break some wsgi implementation. | 154 # break some wsgi implementation. |
155 r.ui.setconfig('progress', 'disable', 'true', 'hgweb') | 155 r.ui.setconfig('progress', 'disable', 'true', 'hgweb') |
156 r.baseui.setconfig('progress', 'disable', 'true', 'hgweb') | 156 r.baseui.setconfig('progress', 'disable', 'true', 'hgweb') |
157 self.repo = r | 157 self.repo = r |
158 hook.redirect(True) | 158 hook.redirect(True) |
159 self.repostate = ((-1, -1), (-1, -1)) | 159 self.repostate = None |
160 self.mtime = -1 | 160 self.mtime = -1 |
161 self.reponame = name | 161 self.reponame = name |
162 # we use untrusted=False to prevent a repo owner from using | 162 # we use untrusted=False to prevent a repo owner from using |
163 # web.templates in .hg/hgrc to get access to any file readable | 163 # web.templates in .hg/hgrc to get access to any file readable |
164 # by the user running the CGI script | 164 # by the user running the CGI script |