diff pylons_app/controllers/summary.py @ 245:a83a1799480c

Reimplemented way of caching repos list, hg model now get's repos objects right from cached dict, this way we skipp creating instances of MercurialRepository and gain performance. Some import cleanup
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 03 Jun 2010 00:04:48 +0200
parents 37a832dc4a82
children 3782a6d698af
line wrap: on
line diff
--- a/pylons_app/controllers/summary.py	Tue Jun 01 22:19:03 2010 +0200
+++ b/pylons_app/controllers/summary.py	Thu Jun 03 00:04:48 2010 +0200
@@ -1,7 +1,7 @@
 from pylons import tmpl_context as c, request
 from pylons_app.lib.auth import LoginRequired
-from pylons_app.lib.base import BaseController, render, _full_changelog_cached
-from pylons_app.model.hg_model import HgModel
+from pylons_app.lib.base import BaseController, render
+from pylons_app.model.hg_model import HgModel, _full_changelog_cached
 import logging
 
 log = logging.getLogger(__name__)
@@ -16,7 +16,6 @@
         hg_model = HgModel()
         c.repo_info = hg_model.get_repo(c.repo_name)
         c.repo_changesets = _full_changelog_cached(c.repo_name)[:10]
-        
         e = request.environ
         uri = u'%(protocol)s://%(user)s@%(host)s/%(repo_name)s' % {
                                         'protocol': e.get('wsgi.url_scheme'),