summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Leray <alexandre@alexandreleray.com>2010-11-06 12:48:46 (GMT)
committer Alexandre Leray <alexandre@alexandreleray.com>2010-11-06 12:48:46 (GMT)
commit69034cd333373ddddef63a792a3484db243e4fb4 (patch)
treecbc696477d79039485cb7f9cd87fc3c3a76660ef
parent01a99b91c9108f7f17bae8f0ac933c3489dbe4a0 (diff)
Reverted the use of diff_match_patch libHEADmaster
-rwxr-xr-xbrainch/views/repositories/diff.py18
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,