Show More
@@ -145,10 +145,11 b' class CompareController(BaseRepoControll' | |||
|
145 | 145 | for cs in scmutil.revrange(hgrepo, revs)] |
|
146 | 146 | |
|
147 | 147 | elif alias == 'git': |
|
148 |
assert org_repo == other_repo, ( |
|
|
148 | assert org_repo == other_repo, ('no support for compare for two ' | |
|
149 | 'different repositories in git') | |
|
149 | 150 | so, se = org_repo.run_git_command( |
|
150 |
'log --reverse --pretty="format: %%H" -s -p %s..%s' |
|
|
151 | other_ref[1]) | |
|
151 | 'log --reverse --pretty="format: %%H" -s -p %s..%s' | |
|
152 | % (org_ref[1], other_ref[1]) | |
|
152 | 153 | ) |
|
153 | 154 | changesets = [org_repo.get_changeset(cs) |
|
154 | 155 | for cs in re.findall(r'[0-9a-fA-F]{40}', so)] |
@@ -223,8 +224,10 b' class CompareController(BaseRepoControll' | |||
|
223 | 224 | |
|
224 | 225 | c.statuses = c.rhodecode_db_repo.statuses([x.raw_id for x in |
|
225 | 226 | c.cs_ranges]) |
|
227 | if not c.ancestor: | |
|
228 | log.warning('Unable to find ancestor revision') | |
|
229 | ||
|
226 | 230 | if partial: |
|
227 | assert c.ancestor | |
|
228 | 231 | return render('compare/compare_cs.html') |
|
229 | 232 | |
|
230 | 233 | if c.ancestor: |
@@ -242,7 +245,8 b' class CompareController(BaseRepoControll' | |||
|
242 | 245 | log.debug('running diff between %s@%s and %s@%s' |
|
243 | 246 | % (org_repo.scm_instance.path, org_ref, |
|
244 | 247 | other_repo.scm_instance.path, other_ref)) |
|
245 |
_diff = org_repo.scm_instance.get_diff(rev1=safe_str(org_ref[1]), |
|
|
248 | _diff = org_repo.scm_instance.get_diff(rev1=safe_str(org_ref[1]), | |
|
249 | rev2=safe_str(other_ref[1])) | |
|
246 | 250 | |
|
247 | 251 | diff_processor = diffs.DiffProcessor(_diff or '', format='gitdiff', |
|
248 | 252 | diff_limit=diff_limit) |
General Comments 0
You need to be logged in to leave comments.
Login now