Show More
@@ -216,6 +216,7 b' class RepoChangelogView(RepoAppView):' | |||
|
216 | 216 | pre_load = self._get_preload_attrs() |
|
217 | 217 | |
|
218 | 218 | partial_xhr = self.request.environ.get('HTTP_X_PARTIAL_XHR') |
|
219 | ||
|
219 | 220 | try: |
|
220 | 221 | if f_path: |
|
221 | 222 | log.debug('generating changelog for path %s', f_path) |
@@ -258,8 +259,15 b' class RepoChangelogView(RepoAppView):' | |||
|
258 | 259 | except (RepositoryError, CommitDoesNotExistError, Exception) as e: |
|
259 | 260 | log.exception(safe_str(e)) |
|
260 | 261 | h.flash(safe_str(h.escape(e)), category='error') |
|
261 | raise HTTPFound( | |
|
262 | h.route_path('repo_commits', repo_name=self.db_repo_name)) | |
|
262 | ||
|
263 | if commit_id: | |
|
264 | # from single commit page, we redirect to main commits | |
|
265 | raise HTTPFound( | |
|
266 | h.route_path('repo_commits', repo_name=self.db_repo_name)) | |
|
267 | else: | |
|
268 | # otherwise we redirect to summary | |
|
269 | raise HTTPFound( | |
|
270 | h.route_path('repo_summary', repo_name=self.db_repo_name)) | |
|
263 | 271 | |
|
264 | 272 | if partial_xhr or self.request.environ.get('HTTP_X_PJAX'): |
|
265 | 273 | # case when loading dynamic file history in file view |
@@ -41,7 +41,7 b' from rhodecode.lib.diffs import (' | |||
|
41 | 41 | get_diff_whitespace_flag) |
|
42 | 42 | from rhodecode.lib.exceptions import StatusChangeOnClosedPullRequestError, CommentVersionMismatch |
|
43 | 43 | import rhodecode.lib.helpers as h |
|
44 | from rhodecode.lib.utils2 import safe_unicode, str2bool, StrictAttributeDict | |
|
44 | from rhodecode.lib.utils2 import safe_unicode, str2bool, StrictAttributeDict, safe_str | |
|
45 | 45 | from rhodecode.lib.vcs.backends.base import EmptyCommit |
|
46 | 46 | from rhodecode.lib.vcs.exceptions import ( |
|
47 | 47 | RepositoryError, CommitDoesNotExistError) |
@@ -110,7 +110,7 b' class RepoCommitsView(RepoAppView):' | |||
|
110 | 110 | if not c.commit_ranges: |
|
111 | 111 | raise RepositoryError('The commit range returned an empty result') |
|
112 | 112 | except CommitDoesNotExistError as e: |
|
113 | msg = _('No such commit exists. Org exception: `{}`').format(e) | |
|
113 | msg = _('No such commit exists. Org exception: `{}`').format(safe_str(e)) | |
|
114 | 114 | h.flash(msg, category='error') |
|
115 | 115 | raise HTTPNotFound() |
|
116 | 116 | except Exception: |
General Comments 0
You need to be logged in to leave comments.
Login now