hgweb: don't make request optional
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 22 Aug 2015 14:22:40 -0700
changeset 26133 44ed220ef26f
parent 26132 9df8c729e2e7
child 26134 e0a6908f066f
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.
mercurial/hgweb/hgweb_mod.py
--- 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.