Mercurial > hg
changeset 6704:8251ffb35725
graph: limit the number of displayed changest to a reasonable value
author | Benoit Allard <benoit@aeteurope.nl> |
---|---|
date | Wed, 18 Jun 2008 19:04:10 +0200 |
parents | bacfee67c1a9 |
children | fec6bc978843 3c715fdc7495 |
files | mercurial/hgweb/webcommands.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Wed Jun 18 16:47:47 2008 +0300 +++ b/mercurial/hgweb/webcommands.py Wed Jun 18 19:04:10 2008 +0200 @@ -578,10 +578,10 @@ def graph(web, req, tmpl): rev = webutil.changectx(web.repo, req).rev() - revcount = int(req.form.get('revcount', [25])[0]) bg_height = 39 max_rev = web.repo.changelog.count() - 1 + revcount = min(max_rev, int(req.form.get('revcount', [25])[0])) revnode = web.repo.changelog.node(rev) revnode_hex = hex(revnode) uprev = min(max_rev, rev + revcount)