# HG changeset patch # User Md. O. Shayan # Date 2011-04-07 07:53:07 # Node ID 08d49b6b8d320eb7cf6705a6eefe68c25a39bdba # Parent 5065e120636d095797bd284c6a39b2efd34748c8 hgweb: fix inconsistant display of graphlog (issue1706) diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -740,8 +740,12 @@ def graph(web, req, tmpl): downrev = max(0, rev - revcount) count = len(web.repo) changenav = webutil.revnavgen(rev, revcount, count, web.repo.changectx) + startrev = rev + # if starting revision is less than 60 set it to uprev + if rev < web.maxshortchanges: + startrev = uprev - dag = graphmod.revisions(web.repo, rev, downrev) + dag = graphmod.revisions(web.repo, startrev, downrev) tree = list(graphmod.colored(dag)) canvasheight = (len(tree) + 1) * bg_height - 27 data = []