##// END OF EJS Templates
report ChangesetDoesNotExistError as an error but don't lose the repo context
Mads Kiilerich -
r3573:881ae12b beta
parent child Browse files
Show More
@@ -86,8 +86,8 b' class ChangelogController(BaseRepoContro'
86 c.statuses = c.rhodecode_db_repo.statuses(page_revisions)
86 c.statuses = c.rhodecode_db_repo.statuses(page_revisions)
87 except (RepositoryError, ChangesetDoesNotExistError, Exception), e:
87 except (RepositoryError, ChangesetDoesNotExistError, Exception), e:
88 log.error(traceback.format_exc())
88 log.error(traceback.format_exc())
89 h.flash(str(e), category='warning')
89 h.flash(str(e), category='error')
90 return redirect(url('home'))
90 return redirect(url('changelog_home', repo_name=c.repo_name))
91
91
92 self._graph(c.rhodecode_repo, collection, c.total_cs, c.size, p)
92 self._graph(c.rhodecode_repo, collection, c.total_cs, c.size, p)
93
93
@@ -203,8 +203,8 b' class ChangesetController(BaseRepoContro'
203
203
204 except (RepositoryError, ChangesetDoesNotExistError, Exception), e:
204 except (RepositoryError, ChangesetDoesNotExistError, Exception), e:
205 log.error(traceback.format_exc())
205 log.error(traceback.format_exc())
206 h.flash(str(e), category='warning')
206 h.flash(str(e), category='error')
207 return redirect(url('home'))
207 return redirect(url('changeset_home', repo_name=c.repo_name))
208
208
209 c.changes = OrderedDict()
209 c.changes = OrderedDict()
210
210
@@ -89,8 +89,8 b' class FilesController(BaseRepoController'
89 category='warning')
89 category='warning')
90 redirect(h.url('summary_home', repo_name=repo_name))
90 redirect(h.url('summary_home', repo_name=repo_name))
91
91
92 except RepositoryError, e:
92 except RepositoryError, e: # including ChangesetDoesNotExistError
93 h.flash(str(e), category='warning')
93 h.flash(str(e), category='error')
94 redirect(h.url('files_home', repo_name=repo_name, revision='tip'))
94 redirect(h.url('files_home', repo_name=repo_name, revision='tip'))
95
95
96 def __get_filenode_or_redirect(self, repo_name, cs, path):
96 def __get_filenode_or_redirect(self, repo_name, cs, path):
@@ -108,7 +108,7 b' class FilesController(BaseRepoController'
108 if file_node.is_dir():
108 if file_node.is_dir():
109 raise RepositoryError('given path is a directory')
109 raise RepositoryError('given path is a directory')
110 except RepositoryError, e:
110 except RepositoryError, e:
111 h.flash(str(e), category='warning')
111 h.flash(str(e), category='error')
112 redirect(h.url('files_home', repo_name=repo_name,
112 redirect(h.url('files_home', repo_name=repo_name,
113 revision=cs.raw_id))
113 revision=cs.raw_id))
114
114
General Comments 0
You need to be logged in to leave comments. Login now