##// END OF EJS Templates
pullrequests: simplify handling of null revisions...
Mads Kiilerich -
r3722:5dcfa630 beta
parent child Browse files
Show More
@@ -39,7 +39,6 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
43
42
44 log = logging.getLogger(__name__)
43 log = logging.getLogger(__name__)
45
44
@@ -186,16 +185,11 b' class PullRequestModel(BaseModel):'
186
185
187 org_rev_spec = "%s('%s')" % (_revset_predicates[org_ref[0]],
186 org_rev_spec = "%s('%s')" % (_revset_predicates[org_ref[0]],
188 safe_str(org_ref[1]))
187 safe_str(org_ref[1]))
189 if org_ref[1] == EmptyChangeset().raw_id:
190 org_rev = org_ref[1]
191 else:
192 org_rev = org_repo._repo[scmutil.revrange(org_repo._repo,
188 org_rev = org_repo._repo[scmutil.revrange(org_repo._repo,
193 [org_rev_spec])[-1]]
189 [org_rev_spec])[-1]]
190
194 other_rev_spec = "%s('%s')" % (_revset_predicates[other_ref[0]],
191 other_rev_spec = "%s('%s')" % (_revset_predicates[other_ref[0]],
195 safe_str(other_ref[1]))
192 safe_str(other_ref[1]))
196 if other_ref[1] == EmptyChangeset().raw_id:
197 other_rev = other_ref[1]
198 else:
199 other_rev = other_repo._repo[scmutil.revrange(other_repo._repo,
193 other_rev = other_repo._repo[scmutil.revrange(other_repo._repo,
200 [other_rev_spec])[-1]]
194 [other_rev_spec])[-1]]
201
195
General Comments 0
You need to be logged in to leave comments. Login now