Changeset - f73a63831d3f
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-04-05 00:40:58
madski@unity3d.com
Grafted from: d5bce87631fb
pullrequests: optimize locating changeset to compare

We only need the max revision - that is much faster when a branch is specified.
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/pull_request.py
Show inline comments
 
@@ -183,13 +183,13 @@ class PullRequestModel(BaseModel):
 
                    'rev': 'id',
 
                }
 

	
 
            org_rev_spec = "%s('%s')" % (_revset_predicates[org_ref[0]],
 
                                         safe_str(org_ref[1]))
 
            org_rev_spec = "max(%s('%s'))" % (_revset_predicates[org_ref[0]],
 
                                              safe_str(org_ref[1]))
 
            org_revs = scmutil.revrange(org_repo._repo, [org_rev_spec])
 
            org_rev = org_repo._repo[org_revs[-1] if org_revs else -1].hex()
 

	
 
            other_rev_spec = "%s('%s')" % (_revset_predicates[other_ref[0]],
 
                                           safe_str(other_ref[1]))
 
            other_rev_spec = "max(%s('%s'))" % (_revset_predicates[other_ref[0]],
 
                                                safe_str(other_ref[1]))
 
            other_revs = scmutil.revrange(other_repo._repo, [other_rev_spec])
 
            other_rev = other_repo._repo[other_revs[-1] if other_revs else -1].hex()
 

	
0 comments (0 inline, 0 general)