hgweb: run with "served" filter
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 15 Jan 2013 22:34:56 +0100
changeset 18429 e9ea0f0f05e7
parent 18428 8c10f760ca34
child 18430 0459c6555f69
hgweb: run with "served" filter This changeset enable the "served" filter on all repo used by hgweb. Hgweb misbehave in a lot of when filtering changeset are present but I do not expect normal people to have secret or obsolete changeset on they server. Misbehavior will be gradually fixed later.
mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py	Wed Jan 16 14:22:43 2013 +0100
+++ b/mercurial/hgweb/hgweb_mod.py	Tue Jan 15 22:34:56 2013 +0100
@@ -59,6 +59,7 @@
         else:
             self.repo = repo
 
+        self.repo =  self.repo.filtered('served')
         self.repo.ui.setconfig('ui', 'report_untrusted', 'off')
         self.repo.ui.setconfig('ui', 'nontty', 'true')
         hook.redirect(True)
@@ -95,6 +96,7 @@
             self.mtime = st.st_mtime
             self.size = st.st_size
             self.repo = hg.repository(self.repo.ui, self.repo.root)
+            self.repo =  self.repo.filtered('served')
             self.maxchanges = int(self.config("web", "maxchanges", 10))
             self.stripecount = int(self.config("web", "stripes", 1))
             self.maxshortchanges = int(self.config("web", "maxshortchanges",