diff options
| -rwxr-xr-x | brainch/views/repositories/diff.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/brainch/views/repositories/diff.py b/brainch/views/repositories/diff.py index 8d54b53..762bcee 100755 --- a/brainch/views/repositories/diff.py +++ b/brainch/views/repositories/diff.py @@ -42,16 +42,16 @@ def diff(request, username, name): if c1 is None or c2 is None: raise Http404 - #commit_1 = repo.repo.commit(c1) - #commit_2 = repo.repo.commit(c2) - #f1 = commit_1.tree["CONTENT"].data - #f2 = commit_2.tree["CONTENT"].data - #ui = diff_match_patch() - #diff = ui.diff_main(f1, f2) - #ui.diff_cleanupSemantic(diff) - #content = ui.diff_prettyXhtml(diff) + commit_1 = repo.repo.commit(c1) + commit_2 = repo.repo.commit(c2) + f1 = commit_1.tree["CONTENT"].data + f2 = commit_2.tree["CONTENT"].data + ui = diff_match_patch() + diff = ui.diff_main(f1, f2) + ui.diff_cleanupSemantic(diff) + content = ui.diff_prettyXhtml(diff) #content = repo.repo.git.diff(c1, c2, color_words=True) - content = repo.wdiff(c1, c2) + #content = repo.wdiff(c1, c2) ctx = { "repo": repo, "content": content, |

