##// END OF EJS Templates
fixed error when given page in pagination was out of range in changelog view
marcink -
r1331:1188920a beta
parent child Browse files
Show More
@@ -90,9 +90,13 b' class ChangelogController(BaseRepoContro'
90
90
91 revcount = min(repo_size, size)
91 revcount = min(repo_size, size)
92 offset = 1 if p == 1 else ((p - 1) * revcount + 1)
92 offset = 1 if p == 1 else ((p - 1) * revcount + 1)
93 rev_start = repo.revisions.index(repo.revisions[(-1 * offset)])
93 try:
94 rev_start = repo.revisions.index(repo.revisions[(-1 * offset)])
95 except IndexError:
96 rev_start = repo.revisions.index(repo.revisions[-1])
94 rev_end = max(0, rev_start - revcount)
97 rev_end = max(0, rev_start - revcount)
95
98
99
96 data = []
100 data = []
97 if repo.alias == 'git':
101 if repo.alias == 'git':
98 for _ in xrange(rev_end, rev_start):
102 for _ in xrange(rev_end, rev_start):
General Comments 0
You need to be logged in to leave comments. Login now