changeset 26133:44ed220ef26f

hgweb: don't make request optional The "request" argument has been optional in this code since it was introduced in 38170eeed18c in 2009. There are no consumers that don't pass this argument. So don't make it an optional argument.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 22 Aug 2015 14:22:40 -0700
parents 9df8c729e2e7
children e0a6908f066f
files mercurial/hgweb/hgweb_mod.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Sat Aug 22 13:58:59 2015 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Sat Aug 22 14:22:40 2015 -0700
@@ -138,7 +138,7 @@
         else:
             return repo.filtered('served')
 
-    def refresh(self, request=None):
+    def refresh(self, request):
         repostate = []
         # file of interrests mtime and size
         for meth, fname in foi:
@@ -163,8 +163,8 @@
             self.repostate = repostate
             # mtime is needed for ETag
             self.mtime = st.st_mtime
-        if request:
-            self.repo.ui.environ = request.env
+
+        self.repo.ui.environ = request.env
 
     def run(self):
         """Start a server from CGI environment.