Changeset - 0c065f793d0e
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2010-11-03 16:29:12
marcin@python-works.com
fixed raw diff breakline bug
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/changeset.py
Show inline comments
 
@@ -148,13 +148,13 @@ class ChangesetController(BaseController
 
                c.changeset_old = None
 
            c.changes = []
 

	
 
            for node in c.changeset.added:
 
                filenode_old = FileNode(node.path, '')
 
                if filenode_old.is_binary or node.is_binary:
 
                    diff = _('binary file')
 
                    diff = _('binary file') +'\n'
 
                else:
 
                    f_udiff = differ.get_udiff(filenode_old, node)
 
                    diff = differ.DiffProcessor(f_udiff).raw_diff()
 

	
 
                cs1 = None
 
                cs2 = node.last_changeset.raw_id
 
@@ -170,14 +170,16 @@ class ChangesetController(BaseController
 

	
 
                cs1 = filenode_old.last_changeset.raw_id
 
                cs2 = node.last_changeset.raw_id
 
                c.changes.append(('changed', node, diff, cs1, cs2))
 

	
 
        response.content_type = 'text/plain'
 
        
 
        if method == 'download':
 
            response.content_disposition = 'attachment; filename=%s.patch' % revision
 
            
 
        parent = True if len(c.changeset.parents) > 0 else False
 
        c.parent_tmpl = 'Parent  %s' % c.changeset.parents[0].raw_id if parent else ''
 

	
 
        c.diffs = ''
 
        for x in c.changes:
 
            c.diffs += x[2]
0 comments (0 inline, 0 general)