Show More
@@ -2,8 +2,6 | |||||
2 |
|
2 | |||
3 | Provides the BaseController class for subclassing. |
|
3 | Provides the BaseController class for subclassing. | |
4 | """ |
|
4 | """ | |
5 | import copy |
|
|||
6 |
|
||||
7 | from pylons import config, tmpl_context as c, request, session |
|
5 | from pylons import config, tmpl_context as c, request, session | |
8 | from pylons.controllers import WSGIController |
|
6 | from pylons.controllers import WSGIController | |
9 | from pylons.templating import render_mako as render |
|
7 | from pylons.templating import render_mako as render | |
@@ -64,9 +62,9 class BaseRepoController(BaseController) | |||||
64 | super(BaseRepoController, self).__before__() |
|
62 | super(BaseRepoController, self).__before__() | |
65 | if c.repo_name: |
|
63 | if c.repo_name: | |
66 |
|
64 | |||
67 | r, dbrepo = self.scm_model.get(c.repo_name, retval='repo') |
|
65 | c.rhodecode_repo, dbrepo = self.scm_model.get(c.repo_name, retval='repo') | |
68 |
|
66 | |||
69 | if r is not None: |
|
67 | if c.rhodecode_repo is not None: | |
70 | c.repository_followers = \ |
|
68 | c.repository_followers = \ | |
71 | self.scm_model.get_followers(c.repo_name) |
|
69 | self.scm_model.get_followers(c.repo_name) | |
72 | c.repository_forks = self.scm_model.get_forks(c.repo_name) |
|
70 | c.repository_forks = self.scm_model.get_forks(c.repo_name) | |
@@ -74,8 +72,3 class BaseRepoController(BaseController) | |||||
74 | c.repository_followers = 0 |
|
72 | c.repository_followers = 0 | |
75 | c.repository_forks = 0 |
|
73 | c.repository_forks = 0 | |
76 |
|
74 | |||
77 | # Since RhodeCode uses heavy memory caching we make a deepcopy |
|
|||
78 | # of object taken from cache. This way we lose reference to cached |
|
|||
79 | # instance in memory and keep it relatively small even for |
|
|||
80 | # very large number of changesets |
|
|||
81 | c.rhodecode_repo = copy.copy(r) |
|
General Comments 0
You need to be logged in to leave comments.
Login now