Changeset - edfbf3ee9965
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 14 years ago 2011-06-30 01:44:58
marcin@python-works.com
fixes #217 Seperate Parents on Raw-changeset page
2 files changed with 4 insertions and 5 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/changeset.py
Show inline comments
 
@@ -221,33 +221,32 @@ class ChangesetController(BaseRepoContro
 

	
 
                cs1 = None
 
                cs2 = node.last_changeset.raw_id
 
                c.changes.append(('added', node, diff, cs1, cs2))
 

	
 
            for node in c.changeset.changed:
 
                filenode_old = c.changeset_parent.get_node(node.path)
 
                if filenode_old.is_binary or node.is_binary:
 
                    diff = _('binary file')
 
                else:
 
                    f_gitdiff = differ.get_gitdiff(filenode_old, node)
 
                    diff = differ.DiffProcessor(f_gitdiff,
 
                                                format='gitdiff').raw_diff()
 

	
 
                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.parent_tmpl = ''.join(['# Parent  %s\n' % x.raw_id for x in
 
                                                 c.changeset.parents])
 

	
 
        c.diffs = ''
 
        for x in c.changes:
 
            c.diffs += x[2]
 

	
 
        return render('changeset/raw_changeset.html')
rhodecode/templates/changeset/raw_changeset.html
Show inline comments
 
# ${c.scm_type} changeset patch
 
# ${c.scm_type.upper()} changeset patch
 
# User ${c.changeset.author|n}
 
# Date ${c.changeset.date}
 
# Node ID ${c.changeset.raw_id}
 
# ${c.parent_tmpl}
 
${c.parent_tmpl}
 
${c.changeset.message}
 

	
 
${c.diffs|n}
 
\ No newline at end of file
0 comments (0 inline, 0 general)