diff --git a/kallithea/controllers/changeset.py b/kallithea/controllers/changeset.py --- a/kallithea/controllers/changeset.py +++ b/kallithea/controllers/changeset.py @@ -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 diff --git a/kallithea/controllers/compare.py b/kallithea/controllers/compare.py --- a/kallithea/controllers/compare.py +++ b/kallithea/controllers/compare.py @@ -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') diff --git a/kallithea/controllers/files.py b/kallithea/controllers/files.py --- a/kallithea/controllers/files.py +++ b/kallithea/controllers/files.py @@ -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') diff --git a/kallithea/controllers/pullrequests.py b/kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py +++ b/kallithea/controllers/pullrequests.py @@ -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 diff --git a/kallithea/templates/changeset/changeset.html b/kallithea/templates/changeset/changeset.html --- a/kallithea/templates/changeset/changeset.html +++ b/kallithea/templates/changeset/changeset.html @@ -168,7 +168,7 @@ ${self.repo_context_bar('changelog', c.c %endif
- %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:
diff --git a/kallithea/templates/changeset/changeset_range.html b/kallithea/templates/changeset/changeset_range.html --- a/kallithea/templates/changeset/changeset_range.html +++ b/kallithea/templates/changeset/changeset_range.html @@ -60,7 +60,7 @@ ${self.repo_context_bar('changelog')} %for cs in c.cs_ranges:
${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}
<% 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:
diff --git a/kallithea/templates/changeset/diff_block.html b/kallithea/templates/changeset/diff_block.html --- a/kallithea/templates/changeset/diff_block.html +++ b/kallithea/templates/changeset/diff_block.html @@ -7,7 +7,7 @@ ↑ ${_('Collapse Diff')} ↑
-%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)} diff --git a/kallithea/templates/compare/compare_diff.html b/kallithea/templates/compare/compare_diff.html --- a/kallithea/templates/compare/compare_diff.html +++ b/kallithea/templates/compare/compare_diff.html @@ -70,7 +70,7 @@ ${self.repo_context_bar('changelog')} %if not c.file_diff_data: ${_('No files')} %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:
diff --git a/kallithea/templates/pullrequests/pullrequest_show.html b/kallithea/templates/pullrequests/pullrequest_show.html --- a/kallithea/templates/pullrequests/pullrequest_show.html +++ b/kallithea/templates/pullrequests/pullrequest_show.html @@ -315,7 +315,7 @@ ${self.repo_context_bar('showpullrequest %if not c.file_diff_data: ${_('No files')} %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: