changeset 2810:4a5c56da2603 beta

fixes #555 issues when comparing non-related repositories on pull requests or compare view
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 05 Sep 2012 23:03:37 +0200
parents 070d2eacd48b
children b1467856a638
files docs/changelog.rst rhodecode/model/pull_request.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/docs/changelog.rst	Wed Sep 05 22:40:07 2012 +0200
+++ b/docs/changelog.rst	Wed Sep 05 23:03:37 2012 +0200
@@ -34,6 +34,7 @@
   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**)
 ----------------------
--- a/rhodecode/model/pull_request.py	Wed Sep 05 22:40:07 2012 +0200
+++ b/rhodecode/model/pull_request.py	Wed Sep 05 23:03:37 2012 +0200
@@ -166,7 +166,8 @@
         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)):
@@ -216,6 +217,7 @@
         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(
@@ -223,7 +225,7 @@
                   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