# HG changeset patch # User Gregory Szorc # Date 2015-08-22 21:22:40 # Node ID 44ed220ef26f650f6586a940791cc68e3e44f5cd # Parent 9df8c729e2e7a15e2e7cf703d71e848701a4cc82 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. diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -138,7 +138,7 @@ class hgweb(object): 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 @@ class hgweb(object): 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.