diff --git a/kallithea/controllers/changeset.py b/kallithea/controllers/changeset.py --- a/kallithea/controllers/changeset.py +++ b/kallithea/controllers/changeset.py @@ -293,10 +293,11 @@ class ChangesetController(BaseRepoContro st = f['stats'] c.lines_added += st['added'] c.lines_deleted += st['deleted'] - fid = h.FID(changeset.raw_id, f['filename']) + filename = f['filename'] + fid = h.FID(changeset.raw_id, filename) diff = diff_processor.as_html(enable_comments=enable_comments, parsed_lines=[f]) - cs_changes[fid] = [cs1, cs2, f['operation'], f['filename'], + cs_changes[fid] = [cs1, cs2, f['operation'], filename, diff, st] else: # downloads/raw we only need RAW diff nothing else diff --git a/kallithea/controllers/compare.py b/kallithea/controllers/compare.py --- a/kallithea/controllers/compare.py +++ b/kallithea/controllers/compare.py @@ -283,12 +283,12 @@ class CompareController(BaseRepoControll c.lines_deleted = 0 for f in _parsed: st = f['stats'] - if not st['binary']: - c.lines_added += st['added'] - c.lines_deleted += st['deleted'] - fid = h.FID('', f['filename']) - c.files.append([fid, f['operation'], f['filename'], f['stats']]) + c.lines_added += st['added'] + c.lines_deleted += st['deleted'] + filename = f['filename'] + fid = h.FID('', filename) + c.files.append([fid, f['operation'], filename, f['stats']]) htmldiff = diff_processor.as_html(enable_comments=False, parsed_lines=[f]) - c.changes[fid] = [f['operation'], f['filename'], htmldiff] + c.changes[fid] = [f['operation'], filename, htmldiff] 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 @@ -695,7 +695,7 @@ class FilesController(BaseRepoController } c.changes = cs_changes - return render('files/file_diff.html') + return render('files/file_diff.html') @LoginRequired() @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', diff --git a/kallithea/controllers/pullrequests.py b/kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py +++ b/kallithea/controllers/pullrequests.py @@ -704,11 +704,12 @@ class PullrequestsController(BaseRepoCon st = f['stats'] c.lines_added += st['added'] c.lines_deleted += st['deleted'] - fid = h.FID('', f['filename']) - c.files.append([fid, f['operation'], f['filename'], f['stats']]) + filename = f['filename'] + fid = h.FID('', filename) + c.files.append([fid, f['operation'], filename, f['stats']]) htmldiff = diff_processor.as_html(enable_comments=True, parsed_lines=[f]) - c.changes[fid] = [f['operation'], f['filename'], htmldiff] + c.changes[fid] = [f['operation'], filename, htmldiff] # 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 @@ -160,25 +160,25 @@ ${self.repo_context_bar('changelog', c.c