Changeset - b95f383f428d
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 13 years ago 2013-05-02 13:50:19
marcin@python-works.com
backported redirection loop fix from beta ref: 222e9432298e
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/changelog.py
Show inline comments
 
@@ -33,13 +33,14 @@ from pylons.i18n.translation import _
 
import rhodecode.lib.helpers as h
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseRepoController, render
 
from rhodecode.lib.helpers import RepoPage
 
from rhodecode.lib.compat import json
 
from rhodecode.lib.graphmod import _colored, _dagwalker
 
from rhodecode.lib.vcs.exceptions import RepositoryError, ChangesetDoesNotExistError
 
from rhodecode.lib.vcs.exceptions import RepositoryError, ChangesetDoesNotExistError,\
 
    EmptyRepositoryError
 
from rhodecode.lib.utils2 import safe_int
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class ChangelogController(BaseRepoController):
 
@@ -77,12 +78,15 @@ class ChangelogController(BaseRepoContro
 
            c.pagination = RepoPage(collection, page=p, item_count=c.total_cs,
 
                                    items_per_page=c.size, branch=branch_name)
 
            collection = list(c.pagination)
 
            page_revisions = [x.raw_id for x in collection]
 
            c.comments = c.rhodecode_db_repo.get_comments(page_revisions)
 
            c.statuses = c.rhodecode_db_repo.statuses(page_revisions)
 
        except (EmptyRepositoryError), e:
 
            h.flash(str(e), category='warning')
 
            return redirect(url('summary_home', repo_name=c.repo_name))
 
        except (RepositoryError, ChangesetDoesNotExistError, Exception), e:
 
            log.error(traceback.format_exc())
 
            h.flash(str(e), category='error')
 
            return redirect(url('changelog_home', repo_name=c.repo_name))
 

	
 
        self._graph(c.rhodecode_repo, collection, c.total_cs, c.size, p)
0 comments (0 inline, 0 general)