comparison mercurial/hgweb/hgweb_mod.py @ 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
comparison
equal deleted inserted replaced
26132:9df8c729e2e7 26133:44ed220ef26f
136 elif viewconfig in repoview.filtertable: 136 elif viewconfig in repoview.filtertable:
137 return repo.filtered(viewconfig) 137 return repo.filtered(viewconfig)
138 else: 138 else:
139 return repo.filtered('served') 139 return repo.filtered('served')
140 140
141 def refresh(self, request=None): 141 def refresh(self, request):
142 repostate = [] 142 repostate = []
143 # file of interrests mtime and size 143 # file of interrests mtime and size
144 for meth, fname in foi: 144 for meth, fname in foi:
145 prefix = getattr(self.repo, meth) 145 prefix = getattr(self.repo, meth)
146 st = get_stat(prefix, fname) 146 st = get_stat(prefix, fname)
161 encoding.encoding) 161 encoding.encoding)
162 # update these last to avoid threads seeing empty settings 162 # update these last to avoid threads seeing empty settings
163 self.repostate = repostate 163 self.repostate = repostate
164 # mtime is needed for ETag 164 # mtime is needed for ETag
165 self.mtime = st.st_mtime 165 self.mtime = st.st_mtime
166 if request: 166
167 self.repo.ui.environ = request.env 167 self.repo.ui.environ = request.env
168 168
169 def run(self): 169 def run(self):
170 """Start a server from CGI environment. 170 """Start a server from CGI environment.
171 171
172 Modern servers should be using WSGI and should avoid this 172 Modern servers should be using WSGI and should avoid this