comparison mercurial/hgweb/webcommands.py @ 37363:d3a2344446e6

hgweb: don't include hidden revisions in /filelog/ view This is a very crude way of doing it, but it seems to be working well enough. The number of entries on the page won't be the usual maximum number per page, but this is good enough for me. Differential Revision: https://phab.mercurial-scm.org/D3122
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 04 Apr 2018 23:55:47 -0700
parents f0b6fbea00cf
children 83d537162894
comparison
equal deleted inserted replaced
37362:c16b55edd408 37363:d3a2344446e6
1056 start = max(0, count - revcount) # first rev on this page 1056 start = max(0, count - revcount) # first rev on this page
1057 end = min(count, start + revcount) # last rev on this page 1057 end = min(count, start + revcount) # last rev on this page
1058 parity = paritygen(web.stripecount, offset=start - end) 1058 parity = paritygen(web.stripecount, offset=start - end)
1059 1059
1060 repo = web.repo 1060 repo = web.repo
1061 revs = fctx.filelog().revs(start, end - 1) 1061 filelog = fctx.filelog()
1062 revs = [filerev for filerev in filelog.revs(start, end - 1)
1063 if filelog.linkrev(filerev) in repo]
1062 entries = [] 1064 entries = []
1063 1065
1064 diffstyle = web.config('web', 'style') 1066 diffstyle = web.config('web', 'style')
1065 if 'style' in web.req.qsparams: 1067 if 'style' in web.req.qsparams:
1066 diffstyle = web.req.qsparams['style'] 1068 diffstyle = web.req.qsparams['style']