##// END OF EJS Templates
compare: using f_path shouldn't generate full range of commits....
marcink -
r1262:fa7f32fd default
parent child Browse files
Show More
@@ -183,21 +183,28 b' class CompareController(BaseRepoControll'
183 183
184 184 pre_load = ["author", "branch", "date", "message"]
185 185 c.ancestor = None
186 try:
187 c.commit_ranges = source_scm.compare(
188 source_commit.raw_id, target_commit.raw_id,
189 target_scm, merge, pre_load=pre_load)
190 if merge:
191 c.ancestor = source_scm.get_common_ancestor(
192 source_commit.raw_id, target_commit.raw_id, target_scm)
193 except RepositoryRequirementError:
194 msg = _('Could not compare repos with different '
195 'large file settings')
196 log.error(msg)
197 if partial:
198 return msg
199 h.flash(msg, category='error')
200 return redirect(url('compare_home', repo_name=c.repo_name))
186
187 if c.file_path:
188 if source_commit == target_commit:
189 c.commit_ranges = []
190 else:
191 c.commit_ranges = [target_commit]
192 else:
193 try:
194 c.commit_ranges = source_scm.compare(
195 source_commit.raw_id, target_commit.raw_id,
196 target_scm, merge, pre_load=pre_load)
197 if merge:
198 c.ancestor = source_scm.get_common_ancestor(
199 source_commit.raw_id, target_commit.raw_id, target_scm)
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 209 c.statuses = c.rhodecode_db_repo.statuses(
203 210 [x.raw_id for x in c.commit_ranges])
General Comments 0
You need to be logged in to leave comments. Login now