Changeset - 4a5c56da2603
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2012-09-05 23:03:37
marcin@python-works.com
fixes #555 issues when comparing non-related repositories on pull requests or compare view
2 files changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
docs/changelog.rst
Show inline comments
 
@@ -31,12 +31,13 @@ fixes
 
  Also forces users to set the default value for new forking permission. 
 
- #535 improved apache wsgi example configuration in docs
 
- fixes #550 mercurial repositories comparision failed when origin repo had
 
  additional not-common changesets
 
- fixed status of code-review in preview windows of pull request
 
- git forks were not initialized at bare repos
 
- fixes #555 fixes issues with comparing non-related repositories
 

	
 
1.4.0 (**2012-09-03**)
 
----------------------
 

	
 
news
 
++++
rhodecode/model/pull_request.py
Show inline comments
 
@@ -163,13 +163,14 @@ class PullRequestModel(BaseModel):
 
        """
 
        changesets = []
 
        #case two independent repos
 
        common, incoming, rheads = discovery_data
 
        if org_repo != other_repo and incoming:
 
            obj = findcommonoutgoing(org_repo._repo,
 
                                     localrepo.locallegacypeer(other_repo._repo.local()))
 
                        localrepo.locallegacypeer(other_repo._repo.local()),
 
                        force=True)
 
            revs = obj.missing
 

	
 
            for cs in reversed(map(binascii.hexlify, revs)):
 
                changesets.append(org_repo.get_changeset(cs))
 
        else:
 
            _revset_predicates = {
 
@@ -213,20 +214,21 @@ class PullRequestModel(BaseModel):
 
        _other_repo = other_repo._repo
 
        other_rev_type, other_rev = other_ref
 

	
 
        log.debug('Doing discovery for %s@%s vs %s@%s' % (
 
                        org_repo, org_ref, other_repo, other_ref)
 
        )
 

	
 
        #log.debug('Filter heads are %s[%s]' % ('', org_ref[1]))
 
        org_peer = localrepo.locallegacypeer(_org_repo.local())
 
        tmp = discovery.findcommonincoming(
 
                  repo=_other_repo,  # other_repo we check for incoming
 
                  remote=org_peer,  # org_repo source for incoming
 
                  heads=[_other_repo[other_rev].node(),
 
                         _org_repo[org_rev].node()],
 
                  force=False
 
                  force=True
 
        )
 
        return tmp
 

	
 
    def get_compare_data(self, org_repo, org_ref, other_repo, other_ref):
 
        """
 
        Returns a tuple of incomming changesets, and discoverydata cache
0 comments (0 inline, 0 general)