Show More
@@ -39,7 +39,8 b' from rhodecode.lib.base import BaseContr' | |||||
39 | from rhodecode.lib.utils import EmptyChangeset |
|
39 | from rhodecode.lib.utils import EmptyChangeset | |
40 | from rhodecode.model.scm import ScmModel |
|
40 | from rhodecode.model.scm import ScmModel | |
41 |
|
41 | |||
42 |
from vcs.exceptions import RepositoryError, ChangesetError, |
|
42 | from vcs.exceptions import RepositoryError, ChangesetError, \ | |
|
43 | ChangesetDoesNotExistError, EmptyRepositoryError | |||
43 | from vcs.nodes import FileNode |
|
44 | from vcs.nodes import FileNode | |
44 | from vcs.utils import diffs as differ |
|
45 | from vcs.utils import diffs as differ | |
45 |
|
46 | |||
@@ -101,6 +102,10 b' class FilesController(BaseController):' | |||||
101 | h.flash(str(e), category='warning') |
|
102 | h.flash(str(e), category='warning') | |
102 | redirect(h.url('files_home', repo_name=repo_name, revision=revision)) |
|
103 | redirect(h.url('files_home', repo_name=repo_name, revision=revision)) | |
103 |
|
104 | |||
|
105 | except EmptyRepositoryError, e: | |||
|
106 | h.flash(_('There are no files yet'), category='warning') | |||
|
107 | redirect(h.url('summary_home', repo_name=repo_name)) | |||
|
108 | ||||
104 | except RepositoryError, e: |
|
109 | except RepositoryError, e: | |
105 | h.flash(str(e), category='warning') |
|
110 | h.flash(str(e), category='warning') | |
106 | redirect(h.url('files_home', repo_name=repo_name, revision='tip')) |
|
111 | redirect(h.url('files_home', repo_name=repo_name, revision='tip')) |
General Comments 0
You need to be logged in to leave comments.
Login now