Show More
@@ -137,7 +137,7 b' class CompareController(BaseRepoControll' | |||
|
137 | 137 | # get parent of |
|
138 | 138 | # rev start to include it in the diff |
|
139 | 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 | 141 | org_ref = ('rev', rev_start) |
|
142 | 142 | other_ref = ('rev', rev_end) |
|
143 | 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 | 40 | from rhodecode.lib.vcs.utils.hgcompat import scmutil |
|
41 | 41 | from rhodecode.lib.vcs.utils import safe_str |
|
42 | from rhodecode.lib.vcs.backends.base import EmptyChangeset | |
|
42 | 43 | |
|
43 | 44 | log = logging.getLogger(__name__) |
|
44 | 45 | |
@@ -180,13 +181,21 b' class PullRequestModel(BaseModel):' | |||
|
180 | 181 | 'tag': 'tag', |
|
181 | 182 | 'rev': 'id', |
|
182 | 183 | } |
|
184 | ||
|
183 | 185 | org_rev_spec = "%s('%s')" % (_revset_predicates[org_ref[0]], |
|
184 | 186 | safe_str(org_ref[1])) |
|
185 | org_rev = scmutil.revsingle(org_repo._repo, | |
|
186 | org_rev_spec) | |
|
187 | if org_ref[1] == EmptyChangeset().raw_id: | |
|
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 | 192 | other_rev_spec = "%s('%s')" % (_revset_predicates[other_ref[0]], |
|
188 | 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 | 200 | #case two independent repos |
|
192 | 201 | if org_repo != other_repo: |
General Comments 0
You need to be logged in to leave comments.
Login now