Show More
@@ -154,7 +154,7 b' class ReposController(BaseController):' | |||||
154 | last_rev = 0 |
|
154 | last_rev = 0 | |
155 | c.stats_revision = last_rev |
|
155 | c.stats_revision = last_rev | |
156 | repo, dbrepo = ScmModel().get(repo_name, retval='repo') |
|
156 | repo, dbrepo = ScmModel().get(repo_name, retval='repo') | |
157 |
c.repo_last_rev = repo. |
|
157 | c.repo_last_rev = repo.count() if repo.revisions else 0 | |
158 |
|
158 | |||
159 | if last_rev == 0: |
|
159 | if last_rev == 0: | |
160 | c.stats_percentage = 0 |
|
160 | c.stats_percentage = 0 | |
@@ -302,7 +302,7 b' class ReposController(BaseController):' | |||||
302 | last_rev = 0 |
|
302 | last_rev = 0 | |
303 | c.stats_revision = last_rev |
|
303 | c.stats_revision = last_rev | |
304 |
|
304 | |||
305 |
c.repo_last_rev = repo. |
|
305 | c.repo_last_rev = repo.count() if repo.revisions else 0 | |
306 |
|
306 | |||
307 | if last_rev == 0 or c.repo_last_rev == 0: |
|
307 | if last_rev == 0 or c.repo_last_rev == 0: | |
308 | c.stats_percentage = 0 |
|
308 | c.stats_percentage = 0 |
@@ -71,8 +71,7 b' class ChangesetController(BaseRepoContro' | |||||
71 | if len(rev_range) == 2: |
|
71 | if len(rev_range) == 2: | |
72 | rev_start = rev_range[0] |
|
72 | rev_start = rev_range[0] | |
73 | rev_end = rev_range[1] |
|
73 | rev_end = rev_range[1] | |
74 |
rev_ranges = c.rhodecode_repo |
|
74 | rev_ranges = list(c.rhodecode_repo[rev_start:rev_end]) | |
75 | range_limit) |
|
|||
76 | else: |
|
75 | else: | |
77 | rev_ranges = [c.rhodecode_repo.get_changeset(revision)] |
|
76 | rev_ranges = [c.rhodecode_repo.get_changeset(revision)] | |
78 |
|
77 |
@@ -117,7 +117,7 b' class SummaryController(BaseRepoControll' | |||||
117 | c.no_data_msg = _('No data loaded yet') |
|
117 | c.no_data_msg = _('No data loaded yet') | |
118 | run_task(get_commits_stats, c.repo.name, ts_min_y, ts_max_y) |
|
118 | run_task(get_commits_stats, c.repo.name, ts_min_y, ts_max_y) | |
119 | else: |
|
119 | else: | |
120 |
c.no_data_msg = _('Statistics |
|
120 | c.no_data_msg = _('Statistics are disabled for this repository') | |
121 | c.ts_min = ts_min_m |
|
121 | c.ts_min = ts_min_m | |
122 | c.ts_max = ts_max_y |
|
122 | c.ts_max = ts_max_y | |
123 |
|
123 |
@@ -33,13 +33,15 b' import logging' | |||||
33 |
|
33 | |||
34 | from hashlib import md5 |
|
34 | from hashlib import md5 | |
35 | from decorator import decorator |
|
35 | from decorator import decorator | |
|
36 | from pylons import config | |||
|
37 | ||||
36 | from vcs.utils.lazy import LazyProperty |
|
38 | from vcs.utils.lazy import LazyProperty | |
37 |
|
39 | |||
38 | from rhodecode.lib import str2bool |
|
40 | from rhodecode.lib import str2bool | |
39 | from rhodecode.lib.pidlock import DaemonLock, LockHeld |
|
41 | from rhodecode.lib.pidlock import DaemonLock, LockHeld | |
40 |
|
42 | |||
41 | from celery.messaging import establish_connection |
|
43 | from celery.messaging import establish_connection | |
42 | from pylons import config |
|
44 | ||
43 |
|
45 | |||
44 | log = logging.getLogger(__name__) |
|
46 | log = logging.getLogger(__name__) | |
45 |
|
47 |
General Comments 0
You need to be logged in to leave comments.
Login now