Show More
@@ -119,11 +119,19 b' class RepoChangelogView(RepoAppView):' | |||||
119 |
|
119 | |||
120 | def _load_changelog_data( |
|
120 | def _load_changelog_data( | |
121 | self, c, collection, page, chunk_size, branch_name=None, |
|
121 | self, c, collection, page, chunk_size, branch_name=None, | |
122 | dynamic=False): |
|
122 | dynamic=False, f_path=None, commit_id=None): | |
123 |
|
123 | |||
124 | def url_generator(**kw): |
|
124 | def url_generator(**kw): | |
125 | query_params = {} |
|
125 | query_params = {} | |
126 | query_params.update(kw) |
|
126 | query_params.update(kw) | |
|
127 | if f_path: | |||
|
128 | # changelog for file | |||
|
129 | return h.route_path( | |||
|
130 | 'repo_changelog_file', | |||
|
131 | repo_name=c.rhodecode_db_repo.repo_name, | |||
|
132 | commit_id=commit_id, f_path=f_path, | |||
|
133 | _query=query_params) | |||
|
134 | else: | |||
127 | return h.route_path( |
|
135 | return h.route_path( | |
128 | 'repo_changelog', |
|
136 | 'repo_changelog', | |
129 | repo_name=c.rhodecode_db_repo.repo_name, _query=query_params) |
|
137 | repo_name=c.rhodecode_db_repo.repo_name, _query=query_params) | |
@@ -215,12 +223,15 b' class RepoChangelogView(RepoAppView):' | |||||
215 | branch_name=branch_name, pre_load=pre_load) |
|
223 | branch_name=branch_name, pre_load=pre_load) | |
216 |
|
224 | |||
217 | self._load_changelog_data( |
|
225 | self._load_changelog_data( | |
218 |
c, collection, p, chunk_size, c.branch_name, |
|
226 | c, collection, p, chunk_size, c.branch_name, | |
|
227 | f_path=f_path, commit_id=commit_id) | |||
219 |
|
228 | |||
220 | except EmptyRepositoryError as e: |
|
229 | except EmptyRepositoryError as e: | |
221 | h.flash(safe_str(h.escape(e)), category='warning') |
|
230 | h.flash(safe_str(h.escape(e)), category='warning') | |
222 | raise HTTPFound( |
|
231 | raise HTTPFound( | |
223 | h.route_path('repo_summary', repo_name=self.db_repo_name)) |
|
232 | h.route_path('repo_summary', repo_name=self.db_repo_name)) | |
|
233 | except HTTPFound: | |||
|
234 | raise | |||
224 | except (RepositoryError, CommitDoesNotExistError, Exception) as e: |
|
235 | except (RepositoryError, CommitDoesNotExistError, Exception) as e: | |
225 | log.exception(safe_str(e)) |
|
236 | log.exception(safe_str(e)) | |
226 | h.flash(safe_str(h.escape(e)), category='error') |
|
237 | h.flash(safe_str(h.escape(e)), category='error') |
General Comments 0
You need to be logged in to leave comments.
Login now