Mercurial > kallithea
changeset 915:35e701dc801e beta
fixed #96 redirect loop on files
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 05 Jan 2011 23:40:25 +0100 |
parents | 110a00c181de |
children | 415321076046 |
files | rhodecode/controllers/files.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/files.py Wed Jan 05 23:39:26 2011 +0100 +++ b/rhodecode/controllers/files.py Wed Jan 05 23:40:25 2011 +0100 @@ -39,7 +39,8 @@ from rhodecode.lib.utils import EmptyChangeset from rhodecode.model.scm import ScmModel -from vcs.exceptions import RepositoryError, ChangesetError, ChangesetDoesNotExistError +from vcs.exceptions import RepositoryError, ChangesetError, \ + ChangesetDoesNotExistError, EmptyRepositoryError from vcs.nodes import FileNode from vcs.utils import diffs as differ @@ -101,6 +102,10 @@ h.flash(str(e), category='warning') redirect(h.url('files_home', repo_name=repo_name, revision=revision)) + except EmptyRepositoryError, e: + h.flash(_('There are no files yet'), category='warning') + redirect(h.url('summary_home', repo_name=repo_name)) + except RepositoryError, e: h.flash(str(e), category='warning') redirect(h.url('files_home', repo_name=repo_name, revision='tip'))