Show More
@@ -183,21 +183,28 b' class CompareController(BaseRepoControll' | |||||
183 |
|
183 | |||
184 | pre_load = ["author", "branch", "date", "message"] |
|
184 | pre_load = ["author", "branch", "date", "message"] | |
185 | c.ancestor = None |
|
185 | c.ancestor = None | |
186 | try: |
|
186 | ||
187 | c.commit_ranges = source_scm.compare( |
|
187 | if c.file_path: | |
188 |
|
|
188 | if source_commit == target_commit: | |
189 | target_scm, merge, pre_load=pre_load) |
|
189 | c.commit_ranges = [] | |
190 |
|
|
190 | else: | |
191 |
c. |
|
191 | c.commit_ranges = [target_commit] | |
192 | source_commit.raw_id, target_commit.raw_id, target_scm) |
|
192 | else: | |
193 | except RepositoryRequirementError: |
|
193 | try: | |
194 | msg = _('Could not compare repos with different ' |
|
194 | c.commit_ranges = source_scm.compare( | |
195 | 'large file settings') |
|
195 | source_commit.raw_id, target_commit.raw_id, | |
196 | log.error(msg) |
|
196 | target_scm, merge, pre_load=pre_load) | |
197 |
if |
|
197 | if merge: | |
198 | return msg |
|
198 | c.ancestor = source_scm.get_common_ancestor( | |
199 | h.flash(msg, category='error') |
|
199 | source_commit.raw_id, target_commit.raw_id, target_scm) | |
200 | return redirect(url('compare_home', repo_name=c.repo_name)) |
|
200 | except RepositoryRequirementError: | |
|
201 | msg = _('Could not compare repos with different ' | |||
|
202 | 'large file settings') | |||
|
203 | log.error(msg) | |||
|
204 | if partial: | |||
|
205 | return msg | |||
|
206 | h.flash(msg, category='error') | |||
|
207 | return redirect(url('compare_home', repo_name=c.repo_name)) | |||
201 |
|
208 | |||
202 | c.statuses = c.rhodecode_db_repo.statuses( |
|
209 | c.statuses = c.rhodecode_db_repo.statuses( | |
203 | [x.raw_id for x in c.commit_ranges]) |
|
210 | [x.raw_id for x in c.commit_ranges]) |
General Comments 0
You need to be logged in to leave comments.
Login now