aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/git_browse/views.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@manus.(none)>2007-02-21 00:17:17 -0800
committerbnewbold <bnewbold@manus.(none)>2007-02-21 00:17:17 -0800
commitc2c9c271553775e9481e8a8f70ddc25bc3273eac (patch)
treeccfc306d20a3a00da1d4646d0340f3a86c879576 /bn_django/git_browse/views.py
parent90f58b36ecc39a1e2108bbdf65da3f184bc57247 (diff)
downloadbnewnet-c2c9c271553775e9481e8a8f70ddc25bc3273eac.tar.gz
bnewnet-c2c9c271553775e9481e8a8f70ddc25bc3273eac.zip
misc forgot to -a
Diffstat (limited to 'bn_django/git_browse/views.py')
-rw-r--r--bn_django/git_browse/views.py29
1 files changed, 21 insertions, 8 deletions
diff --git a/bn_django/git_browse/views.py b/bn_django/git_browse/views.py
index e27d949..f28aa76 100644
--- a/bn_django/git_browse/views.py
+++ b/bn_django/git_browse/views.py
@@ -66,7 +66,7 @@ def view_tree(request, repo, hash=None,branch=None):
hash=hash,
all_objs=tree_objs+blob_objs,))
-def view_log(request, repo, tree_hash=None, branch=None):
+def view_log(request, repo, hash=None):
therepo = get_object_or_404(Repository, slug=repo)
(GITPREFIX, heads, tags) = therepo.scan()
@@ -96,17 +96,30 @@ def view_log(request, repo, tree_hash=None, branch=None):
return render_to_response('git_browse/full_log.html',
dict(object=therepo,
log_objs=log_objs,))
-def view_blob(request, repo, hash, branch=None):
+
+def view_blob(request, repo, hash):
therepo = get_object_or_404(Repository, slug=repo)
(GITPREFIX, heads, tags) = therepo.scan()
- blob = Blob(hash=hash,repo=therepo)
- blob.update()
+ b = Blob(id=hash,repo=therepo)
+ b.update()
- return render_to_response('git_browse/obj.html',
+ return render_to_response('git_browse/blob.html',
dict(object=therepo,
- hash=blob.id,
- size=blob.size,
- contents=blob.contents))
+ heads=heads,
+ tags=tags,
+ hash=b.id,
+ size=b.size,
+ contents=b.contents))
+
+def view_commit(request, repo, hash):
+ therepo = get_object_or_404(Repository, slug=repo)
+ (GITPREFIX, heads, tags) = therepo.scan()
+ c = Commit(id=hash,repo=therepo)
+ c.update()
+
+ return render_to_response('git_browse/commit.html',
+ dict(object=therepo, heads=heads, tags=tags,
+ commit=c))
def view_obj(request, repo, hash, branch=None):
therepo = get_object_or_404(Repository, slug=repo)