Changeset - 41b0e2b92283
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-04-11 15:07:42
madski@unity3d.com
pullrequests: fix reversed diff

b2575bdb847c missed the 'we swap org/other ref' part.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/pullrequests.py
Show inline comments
 
@@ -327,25 +327,25 @@ class PullrequestsController(BaseRepoCon
 

	
 
        c.org_ref = org_ref[1]
 
        c.org_ref_type = org_ref[0]
 
        c.other_ref = other_ref[1]
 
        c.other_ref_type = other_ref[0]
 

	
 
        diff_limit = self.cut_off_limit if not fulldiff else None
 

	
 
        #we swap org/other ref since we run a simple diff on one repo
 
        log.debug('running diff between %s@%s and %s@%s'
 
                  % (org_repo.scm_instance.path, org_ref,
 
                     other_repo.scm_instance.path, other_ref))
 
        _diff = org_repo.scm_instance.get_diff(rev1=safe_str(org_ref[1]), rev2=safe_str(other_ref[1]))
 
        _diff = org_repo.scm_instance.get_diff(rev1=safe_str(other_ref[1]), rev2=safe_str(org_ref[1]))
 

	
 
        diff_processor = diffs.DiffProcessor(_diff or '', format='gitdiff',
 
                                             diff_limit=diff_limit)
 
        _parsed = diff_processor.prepare()
 

	
 
        c.limited_diff = False
 
        if isinstance(_parsed, LimitedDiffContainer):
 
            c.limited_diff = True
 

	
 
        c.files = []
 
        c.changes = {}
 
        c.lines_added = 0
0 comments (0 inline, 0 general)