Changeset - a3a7c3e03b76
[Not reviewed]
Marcin Kuzminski - 15 years ago 2010-05-24 00:58:26
marcin@python-works.com
version bump. Bugfix when changelog parameter was not an int. Added limit for 100 changelogs to view at once.
2 files changed with 10 insertions and 6 deletions:
0 comments (0 inline, 0 general)
pylons_app/__init__.py
Show inline comments
 
@@ -2,7 +2,7 @@
 
Hg app, a web based mercurial repository managment based on pylons
 
"""
 

	
 
VERSION = (0, 7, 2, 'beta')
 
VERSION = (0, 7, 3, 'beta')
 

	
 
__version__ = '.'.join((str(each) for each in VERSION[:4]))
 

	
pylons_app/controllers/changelog.py
Show inline comments
 
from beaker.cache import cache_region
 
from mercurial.graphmod import revisions as graph_rev, colored, CHANGESET
 
from mercurial.node import short
 
from pylons import request, response, session, tmpl_context as c, url, config, \
 
@@ -7,8 +6,6 @@ from pylons.controllers.util import abor
 
from pylons_app.lib.auth import LoginRequired
 
from pylons_app.lib.base import BaseController, render, _full_changelog_cached
 
from pylons_app.lib.filters import age as _age, person
 
from pylons_app.lib.utils import get_repo_slug
 
from pylons_app.model.hg_model import HgModel
 
from simplejson import dumps
 
from webhelpers.paginate import Page
 
import logging
 
@@ -22,11 +19,18 @@ class ChangelogController(BaseController
 
                
 
    def index(self):
 
        if request.params.get('size'):
 
            c.size = int(request.params['size'])
 
            limit = 100
 
            default = 20
 
            try:
 
                int_size = int(request.params.get('size'))
 
            except ValueError:
 
                int_size = default
 
            int_size = int_size if int_size <= limit else limit 
 
            c.size = int_size
 
            session['changelog_size'] = c.size
 
            session.save()
 
        else:
 
            c.size = session.get('changelog_size', 20)
 
            c.size = session.get('changelog_size', default)
 

	
 
        changesets = _full_changelog_cached(c.repo_name)
 
            
0 comments (0 inline, 0 general)