# HG changeset patch # User Dirkjan Ochtman # Date 1221228901 -7200 # Node ID 20a5dd5d6dd93744bcd60a5afe98e95556925818 # Parent b84d273862854bfc92c5cd2b4fd6c8f53ba10240 hgweb: let the web graph cope with low revisions/new repositories (issue1293) diff -r b84d27386285 -r 20a5dd5d6dd9 mercurial/graphmod.py --- a/mercurial/graphmod.py Fri Sep 05 17:28:37 2008 +0200 +++ b/mercurial/graphmod.py Fri Sep 12 16:15:01 2008 +0200 @@ -27,6 +27,7 @@ """ assert start_rev >= stop_rev + assert stop_rev >= 0 curr_rev = start_rev revs = [] cl = repo.changelog diff -r b84d27386285 -r 20a5dd5d6dd9 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Fri Sep 05 17:28:37 2008 +0200 +++ b/mercurial/hgweb/webcommands.py Fri Sep 12 16:15:01 2008 +0200 @@ -588,7 +588,7 @@ count = len(web.repo) changenav = webutil.revnavgen(rev, maxchanges, count, web.repo.changectx) - tree = list(graphmod.graph(web.repo, rev, rev - revcount)) + tree = list(graphmod.graph(web.repo, rev, downrev)) canvasheight = (len(tree) + 1) * bg_height - 27; data = []