aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/git_browse/views.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@manus.(none)>2007-06-01 03:53:36 -0400
committerbnewbold <bnewbold@manus.(none)>2007-06-01 03:53:36 -0400
commit23ffcd2dd06e7193fa7c54aa3f4956922aafdf2a (patch)
tree4c5f5e111bf26ee4fa095e2b3b99c09c98245c23 /bn_django/git_browse/views.py
parentc21fcbc9cb3837495549161817f5d02dd9be5d3b (diff)
downloadbnewnet-23ffcd2dd06e7193fa7c54aa3f4956922aafdf2a.tar.gz
bnewnet-23ffcd2dd06e7193fa7c54aa3f4956922aafdf2a.zip
diff pygmentation for git_browse
Diffstat (limited to 'bn_django/git_browse/views.py')
-rw-r--r--bn_django/git_browse/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bn_django/git_browse/views.py b/bn_django/git_browse/views.py
index ed653df..2722db2 100644
--- a/bn_django/git_browse/views.py
+++ b/bn_django/git_browse/views.py
@@ -107,6 +107,12 @@ def view_commit(request, repo, hash):
c = Commit(id=hash,repo=therepo)
c.update()
+ from pygments import highlight
+ from pygments.lexers import DiffLexer
+ from pygments.formatters import HtmlFormatter
+
+ c.pretty_diff = highlight(c.rawdiff, DiffLexer(), HtmlFormatter())
+
return render_to_response('git_browse/commit.html',
dict(object=therepo, heads=heads, tags=tags,
commit=c))