hgweb: initialize repostate to None
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 22 Aug 2015 15:21:45 -0700
changeset 26149 fd9b1262f0e4
parent 26148 7f49efcaa9b4
child 26152 93258d53ec35
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.
mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py	Wed Aug 26 10:59:09 2015 -0400
+++ b/mercurial/hgweb/hgweb_mod.py	Sat Aug 22 15:21:45 2015 -0700
@@ -156,7 +156,7 @@
         r.baseui.setconfig('progress', 'disable', 'true', 'hgweb')
         self.repo = r
         hook.redirect(True)
-        self.repostate = ((-1, -1), (-1, -1))
+        self.repostate = None
         self.mtime = -1
         self.reponame = name
         # we use untrusted=False to prevent a repo owner from using