Changeset - 934f1fd5d549
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2013-02-19 20:47:55
marcin@python-works.com
rev_start for compare should use parents only if there are present
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/compare.py
Show inline comments
 
@@ -38,12 +38,13 @@ from rhodecode.lib.auth import LoginRequ
 
from rhodecode.lib import diffs
 

	
 
from rhodecode.model.db import Repository
 
from rhodecode.model.pull_request import PullRequestModel
 
from webob.exc import HTTPBadRequest
 
from rhodecode.lib.diffs import LimitedDiffContainer
 
from rhodecode.lib.vcs.backends.base import EmptyChangeset
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class CompareController(BaseRepoController):
 

	
 
@@ -133,13 +134,13 @@ class CompareController(BaseRepoControll
 
            #other_ref = ('rev', rev_end)
 
            c.org_ref = rev_start[:12]
 
            c.other_ref = rev_end[:12]
 
            # get parent of
 
            # rev start to include it in the diff
 
            _cs = other_repo.scm_instance.get_changeset(rev_start)
 
            rev_start = _cs.parents[0].raw_id
 
            rev_start = _cs.parents[0].raw_id if _cs.parents else EmptyChangeset()
 
            org_ref = ('rev', rev_start)
 
            other_ref = ('rev', rev_end)
 
            #if we cherry pick it's not remote, make the other_repo org_repo
 
            org_repo = other_repo
 

	
 
        c.cs_ranges, ancestor = PullRequestModel().get_compare_data(
0 comments (0 inline, 0 general)