Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/webcommands.py @ 10245:207b94f6b65d
hgweb: make graph page size equal to shortlog
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Thu, 14 Jan 2010 16:07:34 +0100 |
parents | 4483af166c61 |
children | b9d02695bde4 |
comparison
equal
deleted
inserted
replaced
10244:c4c0502be198 | 10245:207b94f6b65d |
---|---|
652 tp = [tp] | 652 tp = [tp] |
653 static = [os.path.join(p, 'static') for p in tp] | 653 static = [os.path.join(p, 'static') for p in tp] |
654 return [staticfile(static, fname, req)] | 654 return [staticfile(static, fname, req)] |
655 | 655 |
656 def graph(web, req, tmpl): | 656 def graph(web, req, tmpl): |
657 | |
657 rev = webutil.changectx(web.repo, req).rev() | 658 rev = webutil.changectx(web.repo, req).rev() |
658 bg_height = 39 | 659 bg_height = 39 |
659 | 660 revcount = web.maxshortchanges |
660 revcount = 25 | |
661 if 'revcount' in req.form: | 661 if 'revcount' in req.form: |
662 revcount = int(req.form.get('revcount', [revcount])[0]) | 662 revcount = int(req.form.get('revcount', [revcount])[0]) |
663 tmpl.defaults['sessionvars']['revcount'] = revcount | 663 tmpl.defaults['sessionvars']['revcount'] = revcount |
664 | 664 |
665 lessvars = copy.copy(tmpl.defaults['sessionvars']) | 665 lessvars = copy.copy(tmpl.defaults['sessionvars']) |