hgweb: fix inconsistant display of graphlog (issue1706) stable
authorMd. O. Shayan <mdoshayan@gmail.com>
Thu, 07 Apr 2011 13:23:07 +0530
branchstable
changeset 13905 08d49b6b8d32
parent 13904 5065e120636d
child 13906 a1e418070ff6
child 13912 71ea5b2b9517
hgweb: fix inconsistant display of graphlog (issue1706)
mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py	Thu Apr 07 11:17:55 2011 +0200
+++ b/mercurial/hgweb/webcommands.py	Thu Apr 07 13:23:07 2011 +0530
@@ -740,8 +740,12 @@
     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 = []