diff --git a/rhodecode/lib/base.py b/rhodecode/lib/base.py --- a/rhodecode/lib/base.py +++ b/rhodecode/lib/base.py @@ -2,8 +2,6 @@ Provides the BaseController class for subclassing. """ -import copy - from pylons import config, tmpl_context as c, request, session from pylons.controllers import WSGIController from pylons.templating import render_mako as render @@ -64,9 +62,9 @@ class BaseRepoController(BaseController) super(BaseRepoController, self).__before__() if c.repo_name: - r, dbrepo = self.scm_model.get(c.repo_name, retval='repo') + c.rhodecode_repo, dbrepo = self.scm_model.get(c.repo_name, retval='repo') - if r is not None: + if c.rhodecode_repo is not None: c.repository_followers = \ self.scm_model.get_followers(c.repo_name) c.repository_forks = self.scm_model.get_forks(c.repo_name) @@ -74,8 +72,3 @@ class BaseRepoController(BaseController) c.repository_followers = 0 c.repository_forks = 0 - # Since RhodeCode uses heavy memory caching we make a deepcopy - # of object taken from cache. This way we lose reference to cached - # instance in memory and keep it relatively small even for - # very large number of changesets - c.rhodecode_repo = copy.copy(r)