mercurial/hgweb/hgweb_mod.py
changeset 50436 4077d6222cf1
parent 49846 fda5a4b853ab
child 50573 3b642b384b14
--- a/mercurial/hgweb/hgweb_mod.py	Tue Mar 14 05:30:34 2023 +0100
+++ b/mercurial/hgweb/hgweb_mod.py	Sat Apr 13 01:17:56 2019 +0200
@@ -39,6 +39,7 @@
 )
 
 from . import (
+    common,
     request as requestmod,
     webcommands,
     webutil,
@@ -124,6 +125,16 @@
         self.req = req
         self.res = res
 
+        # Only works if the filter actually support being upgraded to show
+        # visible changesets
+        current_filter = repo.filtername
+        if (
+            common.hashiddenaccess(repo, req)
+            and current_filter is not None
+            and current_filter + b'.hidden' in repoview.filtertable
+        ):
+            self.repo = self.repo.filtered(repo.filtername + b'.hidden')
+
         self.maxchanges = self.configint(b'web', b'maxchanges')
         self.stripecount = self.configint(b'web', b'stripes')
         self.maxshortchanges = self.configint(b'web', b'maxshortchanges')