Show More
@@ -389,6 +389,11 b' class RepoAppView(BaseAppView):' | |||
|
389 | 389 | return True |
|
390 | 390 | return False |
|
391 | 391 | |
|
392 | def get_commit_preload_attrs(cls): | |
|
393 | pre_load = ['author', 'branch', 'date', 'message', 'parents', | |
|
394 | 'obsolete', 'phase', 'hidden'] | |
|
395 | return pre_load | |
|
396 | ||
|
392 | 397 | |
|
393 | 398 | class PathFilter(object): |
|
394 | 399 |
@@ -168,11 +168,6 b' class RepoChangelogView(RepoAppView):' | |||
|
168 | 168 | |
|
169 | 169 | return c |
|
170 | 170 | |
|
171 | def _get_preload_attrs(self): | |
|
172 | pre_load = ['author', 'branch', 'date', 'message', 'parents', | |
|
173 | 'obsolete', 'phase', 'hidden'] | |
|
174 | return pre_load | |
|
175 | ||
|
176 | 171 | @LoginRequired() |
|
177 | 172 | @HasRepoPermissionAnyDecorator( |
|
178 | 173 | 'repository.read', 'repository.write', 'repository.admin') |
@@ -200,7 +195,7 b' class RepoChangelogView(RepoAppView):' | |||
|
200 | 195 | self._check_if_valid_branch(branch_name, self.db_repo_name, f_path) |
|
201 | 196 | |
|
202 | 197 | c.changelog_for_path = f_path |
|
203 |
pre_load = self. |
|
|
198 | pre_load = self.get_commit_preload_attrs() | |
|
204 | 199 | |
|
205 | 200 | partial_xhr = self.request.environ.get('HTTP_X_PARTIAL_XHR') |
|
206 | 201 | |
@@ -256,6 +251,8 b' class RepoChangelogView(RepoAppView):' | |||
|
256 | 251 | raise HTTPFound( |
|
257 | 252 | h.route_path('repo_summary', repo_name=self.db_repo_name)) |
|
258 | 253 | |
|
254 | ||
|
255 | ||
|
259 | 256 | if partial_xhr or self.request.environ.get('HTTP_X_PJAX'): |
|
260 | 257 | # case when loading dynamic file history in file view |
|
261 | 258 | # loading from ajax, we don't want the first result, it's popped |
@@ -304,7 +301,7 b' class RepoChangelogView(RepoAppView):' | |||
|
304 | 301 | return wrap_for_error( |
|
305 | 302 | safe_str('Branch: {} is not valid'.format(branch_name))) |
|
306 | 303 | |
|
307 |
pre_load = self. |
|
|
304 | pre_load = self.get_commit_preload_attrs() | |
|
308 | 305 | |
|
309 | 306 | if f_path: |
|
310 | 307 | try: |
@@ -65,7 +65,8 b' class RepoSummaryView(RepoAppView):' | |||
|
65 | 65 | 'repo_summary_commits', |
|
66 | 66 | repo_name=c.rhodecode_db_repo.repo_name, _query=query_params) |
|
67 | 67 | |
|
68 | pre_load = ['author', 'branch', 'date', 'message'] | |
|
68 | pre_load = self.get_commit_preload_attrs() | |
|
69 | ||
|
69 | 70 | try: |
|
70 | 71 | collection = self.rhodecode_vcs_repo.get_commits( |
|
71 | 72 | pre_load=pre_load, translate_tags=False) |
General Comments 0
You need to be logged in to leave comments.
Login now