# HG changeset patch # User Dirkjan Ochtman # Date 2010-01-14 15:07:34 # Node ID 207b94f6b65dc9913c5dc45ce758576a9f388dab # Parent c4c0502be198fb294413853e896f2825b0435bad hgweb: make graph page size equal to shortlog diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -654,10 +654,10 @@ def static(web, req, tmpl): return [staticfile(static, fname, req)] def graph(web, req, tmpl): + rev = webutil.changectx(web.repo, req).rev() bg_height = 39 - - revcount = 25 + revcount = web.maxshortchanges if 'revcount' in req.form: revcount = int(req.form.get('revcount', [revcount])[0]) tmpl.defaults['sessionvars']['revcount'] = revcount diff --git a/tests/test-hgweb-commands.out b/tests/test-hgweb-commands.out --- a/tests/test-hgweb-commands.out +++ b/tests/test-hgweb-commands.out @@ -660,8 +660,8 @@ graph | branches | files
-less -more +less +more | (0) -2 tip
@@ -746,8 +746,8 @@ graph.render(data); diff --git a/tests/test-hgweb-empty.out b/tests/test-hgweb-empty.out --- a/tests/test-hgweb-empty.out +++ b/tests/test-hgweb-empty.out @@ -184,8 +184,8 @@ files, or words in the commit message @@ -267,8 +267,8 @@ graph.render(data);