Changeset - f79320e47e99
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2012-07-18 19:09:12
marcin@python-works.com
Merged pull request #56
- fixed issue with resolution of ref_types for mercurial
- now properly handles ref type
- added option to compare by specific revisions also
2 files changed with 16 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/config/routing.py
Show inline comments
 
@@ -437,8 +437,8 @@ def make_map(config):
 
                 '/{repo_name:.*}/compare/{org_ref_type}@{org_ref}...{other_ref_type}@{other_ref}',
 
                 controller='compare', action='index',
 
                 conditions=dict(function=check_repo),
 
                 requirements=dict(org_ref_type='(branch|book|tag)',
 
                                   other_ref_type='(branch|book|tag)'))
 
                 requirements=dict(org_ref_type='(branch|book|tag|rev)',
 
                                   other_ref_type='(branch|book|tag|rev)'))
 

	
 
    rmap.connect('pullrequest_home',
 
                 '/{repo_name:.*}/pull-request/new', controller='pullrequests',
rhodecode/model/pull_request.py
Show inline comments
 
@@ -161,8 +161,20 @@ class PullRequestModel(BaseModel):
 
            for cs in reversed(map(binascii.hexlify, revs)):
 
                changesets.append(org_repo.get_changeset(cs))
 
        else:
 
            revs = ['ancestors(%s) and not ancestors(%s)' % (org_ref[1],
 
                                                             other_ref[1])]
 
            _revset_predicates = {
 
                    'branch': 'branch',
 
                    'book': 'bookmark',
 
                    'tag': 'tag',
 
                    'rev': 'id',
 
                }
 

	
 
            revs = [
 
                "ancestors(%s('%s')) and not ancestors(%s('%s'))" % (
 
                    _revset_predicates[org_ref[0]], org_ref[1],
 
                    _revset_predicates[other_ref[0]], other_ref[1]
 
               )
 
            ]
 

	
 
            from mercurial import scmutil
 
            out = scmutil.revrange(org_repo._repo, revs)
 
            for cs in reversed(out):
0 comments (0 inline, 0 general)