mercurial/hgweb/hgweb_mod.py
changeset 50473 4077d6222cf1
parent 49928 fda5a4b853ab
child 50607 3b642b384b14
equal deleted inserted replaced
50472:3973b1dc3ee3 50473:4077d6222cf1
    37     util,
    37     util,
    38     wireprotoserver,
    38     wireprotoserver,
    39 )
    39 )
    40 
    40 
    41 from . import (
    41 from . import (
       
    42     common,
    42     request as requestmod,
    43     request as requestmod,
    43     webcommands,
    44     webcommands,
    44     webutil,
    45     webutil,
    45     wsgicgi,
    46     wsgicgi,
    46 )
    47 )
   121     def __init__(self, app, repo, req, res):
   122     def __init__(self, app, repo, req, res):
   122         self.repo = repo
   123         self.repo = repo
   123         self.reponame = app.reponame
   124         self.reponame = app.reponame
   124         self.req = req
   125         self.req = req
   125         self.res = res
   126         self.res = res
       
   127 
       
   128         # Only works if the filter actually support being upgraded to show
       
   129         # visible changesets
       
   130         current_filter = repo.filtername
       
   131         if (
       
   132             common.hashiddenaccess(repo, req)
       
   133             and current_filter is not None
       
   134             and current_filter + b'.hidden' in repoview.filtertable
       
   135         ):
       
   136             self.repo = self.repo.filtered(repo.filtername + b'.hidden')
   126 
   137 
   127         self.maxchanges = self.configint(b'web', b'maxchanges')
   138         self.maxchanges = self.configint(b'web', b'maxchanges')
   128         self.stripecount = self.configint(b'web', b'stripes')
   139         self.stripecount = self.configint(b'web', b'stripes')
   129         self.maxshortchanges = self.configint(b'web', b'maxshortchanges')
   140         self.maxshortchanges = self.configint(b'web', b'maxshortchanges')
   130         self.maxfiles = self.configint(b'web', b'maxfiles')
   141         self.maxfiles = self.configint(b'web', b'maxfiles')