Show More
@@ -137,7 +137,7 b' class CompareController(BaseRepoControll' | |||||
137 | # get parent of |
|
137 | # get parent of | |
138 | # rev start to include it in the diff |
|
138 | # rev start to include it in the diff | |
139 | _cs = other_repo.scm_instance.get_changeset(rev_start) |
|
139 | _cs = other_repo.scm_instance.get_changeset(rev_start) | |
140 | rev_start = _cs.parents[0].raw_id if _cs.parents else EmptyChangeset() |
|
140 | rev_start = _cs.parents[0].raw_id if _cs.parents else EmptyChangeset().raw_id | |
141 | org_ref = ('rev', rev_start) |
|
141 | org_ref = ('rev', rev_start) | |
142 | other_ref = ('rev', rev_end) |
|
142 | other_ref = ('rev', rev_end) | |
143 | #if we cherry pick it's not remote, make the other_repo org_repo |
|
143 | #if we cherry pick it's not remote, make the other_repo org_repo |
@@ -39,6 +39,7 b' from rhodecode.lib.utils2 import safe_un' | |||||
39 |
|
39 | |||
40 | from rhodecode.lib.vcs.utils.hgcompat import scmutil |
|
40 | from rhodecode.lib.vcs.utils.hgcompat import scmutil | |
41 | from rhodecode.lib.vcs.utils import safe_str |
|
41 | from rhodecode.lib.vcs.utils import safe_str | |
|
42 | from rhodecode.lib.vcs.backends.base import EmptyChangeset | |||
42 |
|
43 | |||
43 | log = logging.getLogger(__name__) |
|
44 | log = logging.getLogger(__name__) | |
44 |
|
45 | |||
@@ -180,13 +181,21 b' class PullRequestModel(BaseModel):' | |||||
180 | 'tag': 'tag', |
|
181 | 'tag': 'tag', | |
181 | 'rev': 'id', |
|
182 | 'rev': 'id', | |
182 | } |
|
183 | } | |
|
184 | ||||
183 | org_rev_spec = "%s('%s')" % (_revset_predicates[org_ref[0]], |
|
185 | org_rev_spec = "%s('%s')" % (_revset_predicates[org_ref[0]], | |
184 | safe_str(org_ref[1])) |
|
186 | safe_str(org_ref[1])) | |
185 | org_rev = scmutil.revsingle(org_repo._repo, |
|
187 | if org_ref[1] == EmptyChangeset().raw_id: | |
186 | org_rev_spec) |
|
188 | org_rev = org_ref[1] | |
|
189 | else: | |||
|
190 | org_rev = org_repo._repo[scmutil.revrange(org_repo._repo, | |||
|
191 | [org_rev_spec])[-1]] | |||
187 | other_rev_spec = "%s('%s')" % (_revset_predicates[other_ref[0]], |
|
192 | other_rev_spec = "%s('%s')" % (_revset_predicates[other_ref[0]], | |
188 | safe_str(other_ref[1])) |
|
193 | safe_str(other_ref[1])) | |
189 | other_rev = scmutil.revsingle(other_repo._repo, other_rev_spec) |
|
194 | if other_ref[1] == EmptyChangeset().raw_id: | |
|
195 | other_rev = other_ref[1] | |||
|
196 | else: | |||
|
197 | other_rev = other_repo._repo[scmutil.revrange(other_repo._repo, | |||
|
198 | [other_rev_spec])[-1]] | |||
190 |
|
199 | |||
191 | #case two independent repos |
|
200 | #case two independent repos | |
192 | if org_repo != other_repo: |
|
201 | if org_repo != other_repo: |
General Comments 0
You need to be logged in to leave comments.
Login now