Changeset - 1cf51cd05e36
[Not reviewed]
default
0 9 0
Mads Kiilerich - 9 years ago 2016-11-10 16:10:41
madski@unity3d.com
diff: use list instead of OrderedDict - keep it simple
9 files changed with 13 insertions and 13 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changeset.py
Show inline comments
 
@@ -280,7 +280,7 @@ class ChangesetController(BaseRepoContro
 
                                                 vcs=c.db_repo_scm_instance.alias,
 
                                                 format='gitdiff',
 
                                                 diff_limit=diff_limit)
 
            file_diff_data = OrderedDict()
 
            file_diff_data = []
 
            if method == 'show':
 
                _parsed = diff_processor.prepare()
 
                c.limited_diff = False
 
@@ -295,11 +295,11 @@ class ChangesetController(BaseRepoContro
 
                    url_fid = h.FID('', filename)
 
                    diff = diff_processor.as_html(enable_comments=enable_comments,
 
                                                  parsed_lines=[f])
 
                    file_diff_data[fid] = (url_fid, f['operation'], f['old_filename'], filename, diff, st)
 
                    file_diff_data.append((fid, url_fid, f['operation'], f['old_filename'], filename, diff, st))
 
            else:
 
                # downloads/raw we only need RAW diff nothing else
 
                diff = diff_processor.as_raw()
 
                file_diff_data[''] = (None, None, None, diff, None)
 
                file_diff_data.append(('', None, None, None, diff, None))
 
            c.changes[changeset.raw_id] = (cs1, cs2, file_diff_data)
 

	
 
        #sort comments in creation order
kallithea/controllers/compare.py
Show inline comments
 
@@ -283,7 +283,7 @@ class CompareController(BaseRepoControll
 
        if isinstance(_parsed, LimitedDiffContainer):
 
            c.limited_diff = True
 

	
 
        c.file_diff_data = OrderedDict()
 
        c.file_diff_data = []
 
        c.lines_added = 0
 
        c.lines_deleted = 0
 
        for f in _parsed:
 
@@ -294,6 +294,6 @@ class CompareController(BaseRepoControll
 
            fid = h.FID('', filename)
 
            diff = diff_processor.as_html(enable_comments=False,
 
                                          parsed_lines=[f])
 
            c.file_diff_data[fid] = (None, f['operation'], f['old_filename'], filename, diff, st)
 
            c.file_diff_data.append((fid, None, f['operation'], f['old_filename'], filename, diff, st))
 

	
 
        return render('compare/compare_diff.html')
kallithea/controllers/files.py
Show inline comments
 
@@ -690,7 +690,7 @@ class FilesController(BaseRepoController
 
                                         ignore_whitespace=ign_whitespace_lcl,
 
                                         line_context=line_context_lcl,
 
                                         enable_comments=False)
 
            c.file_diff_data = {fid: (fid, op, a_path, node2.path, diff, st)}
 
            c.file_diff_data = [(fid, fid, op, a_path, node2.path, diff, st)]
 

	
 
            return render('files/file_diff.html')
 

	
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -738,7 +738,7 @@ class PullrequestsController(BaseRepoCon
 
        if isinstance(_parsed, LimitedDiffContainer):
 
            c.limited_diff = True
 

	
 
        c.file_diff_data = OrderedDict()
 
        c.file_diff_data = []
 
        c.lines_added = 0
 
        c.lines_deleted = 0
 

	
 
@@ -750,7 +750,7 @@ class PullrequestsController(BaseRepoCon
 
            fid = h.FID('', filename)
 
            diff = diff_processor.as_html(enable_comments=True,
 
                                          parsed_lines=[f])
 
            c.file_diff_data[fid] = (None, f['operation'], f['old_filename'], filename, diff, st)
 
            c.file_diff_data.append((fid, None, f['operation'], f['old_filename'], filename, diff, st))
 

	
 
        # inline comments
 
        c.inline_cnt = 0
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -168,7 +168,7 @@ ${self.repo_context_bar('changelog', c.c
 
              %endif
 
              </div>
 
              <div class="cs_files">
 
                %for fid, (url_fid, op, a_path, path, diff, stats) in file_diff_data.iteritems():
 
                %for fid, url_fid, op, a_path, path, diff, stats in file_diff_data:
 
                    <div class="cs_${op}">
 
                      <div class="node">
 
                          <i class="icon-diff-${op}"></i>
kallithea/templates/changeset/changeset_range.html
Show inline comments
 
@@ -60,7 +60,7 @@ ${self.repo_context_bar('changelog')}
 
                %for cs in c.cs_ranges:
 
                    <div class="cur_cs">${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}</div>
 
                    <% a_rev, cs_rev, file_diff_data = c.changes[cs.raw_id] %>
 
                    %for fid, (url_fid, op, a_path, path, diff, stats) in file_diff_data.iteritems():
 
                    %for fid, url_fid, op, a_path, path, diff, stats in file_diff_data:
 
                        <div class="cs_${op}">
 
                            <div class="node">
 
                                <i class="icon-diff-${op}"></i>
kallithea/templates/changeset/diff_block.html
Show inline comments
 
@@ -7,7 +7,7 @@
 
    <span target="${'diff-container-%s' % (id(file_diff_data))}" class="diff-collapse-button">&uarr; ${_('Collapse Diff')} &uarr;</span>
 
</div>
 
<div class="diff-container" id="${'diff-container-%s' % (id(file_diff_data))}">
 
%for id_fid, (url_fid, op, a_filename, cs_filename, diff, stats) in file_diff_data.iteritems():
 
%for id_fid, url_fid, op, a_filename, cs_filename, diff, stats in file_diff_data:
 
    ${diff_block_diffblock(id_fid, url_fid, op, diff,
 
        a_repo_name, a_rev, a_ref_type, a_ref_name, a_filename,
 
        cs_repo_name, cs_rev, cs_ref_type, cs_ref_name, cs_filename)}
kallithea/templates/compare/compare_diff.html
Show inline comments
 
@@ -70,7 +70,7 @@ ${self.repo_context_bar('changelog')}
 
                  %if not c.file_diff_data:
 
                     <span class="empty_data">${_('No files')}</span>
 
                  %endif
 
                  %for fid, (url_fid, op, a_path, path, diff, stats) in c.file_diff_data.iteritems():
 
                  %for fid, url_fid, op, a_path, path, diff, stats in c.file_diff_data:
 
                    <div class="cs_${op}">
 
                      <div class="node">
 
                          <i class="icon-diff-${op}"></i>
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -315,7 +315,7 @@ ${self.repo_context_bar('showpullrequest
 
                %if not c.file_diff_data:
 
                   <span class="empty_data">${_('No files')}</span>
 
                %endif
 
                %for fid, (url_fid, op, a_path, path, diff, stats) in c.file_diff_data.iteritems():
 
                %for fid, url_fid, op, a_path, path, diff, stats in c.file_diff_data:
 
                    <div class="cs_${op}">
 
                      <div class="node">
 
                          <i class="icon-diff-${op}"></i>
0 comments (0 inline, 0 general)