Changeset - 5e59f29edf66
[Not reviewed]
default
0 3 0
Marcin Kuzminski - 15 years ago 2010-06-11 16:52:00
marcin@python-works.com
changed way of getting repository in changelog. + some code cleanups
3 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
pylons_app/controllers/changelog.py
Show inline comments
 
@@ -25,7 +25,7 @@ changelog controller for pylons
 
from pylons import request, session, tmpl_context as c
 
from pylons_app.lib.auth import LoginRequired
 
from pylons_app.lib.base import BaseController, render
 
from pylons_app.model.hg_model import _full_changelog_cached
 
from pylons_app.model.hg_model import HgModel
 
from webhelpers.paginate import Page
 
import logging
 
log = logging.getLogger(__name__)     
 
@@ -51,7 +51,7 @@ class ChangelogController(BaseController
 
        else:
 
            c.size = session.get('changelog_size', default)
 

	
 
        changesets = _full_changelog_cached(c.repo_name)
 
        changesets = HgModel().get_repo(c.repo_name)
 
            
 
        p = int(request.params.get('page', 1))
 
        c.pagination = Page(changesets, page=p, item_count=len(changesets),
pylons_app/controllers/shortlog.py
Show inline comments
 
@@ -38,9 +38,8 @@ class ShortlogController(BaseController)
 
        super(ShortlogController, self).__before__()
 
        
 
    def index(self):
 
        hg_model = HgModel()
 
        p = int(request.params.get('page', 1))
 
        repo = hg_model.get_repo(c.repo_name)
 
        repo = HgModel().get_repo(c.repo_name)
 
        c.repo_changesets = Page(repo, page=p, items_per_page=20)
 
        c.shortlog_data = render('shortlog/shortlog_data.html')
 
        if request.params.get('partial'):
pylons_app/model/hg_model.py
Show inline comments
 
@@ -53,6 +53,7 @@ def _get_repos_cached():
 
    """
 
    return cached dict with repos
 
    """
 
    log.info('getting all repositories list')
 
    from pylons import app_globals as g
 
    return HgModel.repo_scan(g.paths[0][0], g.paths[0][1], g.baseui)
 

	
0 comments (0 inline, 0 general)