##// END OF EJS Templates
hgweb: fix incorrect revisions count in graph (issue3977)...
Alexander Plavin -
r19487:8cfa3a36 stable
parent child Browse files
Show More
@@ -875,16 +875,20 b' def graph(web, req, tmpl):'
875
875
876 count = len(web.repo)
876 count = len(web.repo)
877 pos = rev
877 pos = rev
878 start = max(0, pos - revcount + 1)
879 end = pos + 1
880
878
881 uprev = min(max(0, count - 1), rev + revcount)
879 uprev = min(max(0, count - 1), rev + revcount)
882 downrev = max(0, rev - revcount)
880 downrev = max(0, rev - revcount)
883 changenav = webutil.revnav(web.repo).gen(pos, revcount, count)
881 changenav = webutil.revnav(web.repo).gen(pos, revcount, count)
884
882
885 tree = []
883 tree = []
886 if start < end:
884 if pos != -1:
887 revs = list(web.repo.changelog.revs(end - 1, start))
885 allrevs = web.repo.changelog.revs(pos, 0)
886 revs = []
887 for i in allrevs:
888 revs.append(i)
889 if len(revs) >= revcount:
890 break
891
888 dag = graphmod.dagwalker(web.repo, revs)
892 dag = graphmod.dagwalker(web.repo, revs)
889 tree = list(graphmod.colored(dag, web.repo))
893 tree = list(graphmod.colored(dag, web.repo))
890
894
General Comments 0
You need to be logged in to leave comments. Login now