comparison mercurial/hgweb/webcommands.py @ 20021:4830763f825c

hgweb: remove unused argument of entries function in filelog This doesn't change the behavior as the argument wasn't used anyway.
author Alexander Plavin <alexander@plav.in>
date Sun, 10 Nov 2013 18:05:53 +0400
parents 06e118c097ff
children d85dfe211c71
comparison
equal deleted inserted replaced
20020:6fb59247c7d5 20021:4830763f825c
834 count = fctx.filerev() + 1 834 count = fctx.filerev() + 1
835 start = max(0, fctx.filerev() - revcount + 1) # first rev on this page 835 start = max(0, fctx.filerev() - revcount + 1) # first rev on this page
836 end = min(count, start + revcount) # last rev on this page 836 end = min(count, start + revcount) # last rev on this page
837 parity = paritygen(web.stripecount, offset=start - end) 837 parity = paritygen(web.stripecount, offset=start - end)
838 838
839 def entries(latestonly, **map): 839 def entries(latestonly):
840 l = [] 840 l = []
841 841
842 repo = web.repo 842 repo = web.repo
843 revs = repo.changelog.revs(start, end - 1) 843 revs = repo.changelog.revs(start, end - 1)
844 if latestonly: 844 if latestonly:
869 yield e 869 yield e
870 870
871 revnav = webutil.filerevnav(web.repo, fctx.path()) 871 revnav = webutil.filerevnav(web.repo, fctx.path())
872 nav = revnav.gen(end - 1, revcount, count) 872 nav = revnav.gen(end - 1, revcount, count)
873 return tmpl("filelog", file=f, node=fctx.hex(), nav=nav, 873 return tmpl("filelog", file=f, node=fctx.hex(), nav=nav,
874 entries=lambda **x: entries(latestonly=False, **x), 874 entries=lambda **x: entries(latestonly=False),
875 latestentry=lambda **x: entries(latestonly=True, **x), 875 latestentry=lambda **x: entries(latestonly=True),
876 revcount=revcount, morevars=morevars, lessvars=lessvars) 876 revcount=revcount, morevars=morevars, lessvars=lessvars)
877 877
878 def archive(web, req, tmpl): 878 def archive(web, req, tmpl):
879 type_ = req.form.get('type', [None])[0] 879 type_ = req.form.get('type', [None])[0]
880 allowed = web.configlist("web", "allow_archive") 880 allowed = web.configlist("web", "allow_archive")