diffs: added diff navigation to improve UX when browisng the full context diffs.

This commit is contained in:
Marcin Kuzminski 2020-07-13 11:12:21 +02:00
parent 9cadf302eb
commit 012f801f16
8 changed files with 658 additions and 6 deletions

View file

@ -540,10 +540,11 @@ class DiffSet(object):
})
file_chunks = patch['chunks'][1:]
for hunk in file_chunks:
for i, hunk in enumerate(file_chunks, 1):
hunkbit = self.parse_hunk(hunk, source_file, target_file)
hunkbit.source_file_path = source_file_path
hunkbit.target_file_path = target_file_path
hunkbit.index = i
filediff.hunks.append(hunkbit)
# Simulate hunk on OPS type line which doesn't really contain any diff