diff options
Diffstat (limited to 'bn_django/git_browse/views.py')
-rw-r--r-- | bn_django/git_browse/views.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bn_django/git_browse/views.py b/bn_django/git_browse/views.py index e953d26..1f1b03c 100644 --- a/bn_django/git_browse/views.py +++ b/bn_django/git_browse/views.py @@ -48,9 +48,21 @@ def view_tree(request, repo, hash=None,branch=None): if len(l) < 4: continue if l[1] == 'tree': - tree_objs.append(tree_from_str(line)) + t = Tree(id=l[2]) + t.path = ' '.join(l[3:]) + #if self.path and self.path != '/': + # t.path = self.path + '/' + t.path + t.name = t.path + t.type = 'tree' + tree_objs.append(t) if l[1] == 'blob': - tree_objs.append(blob_from_str(line)) + i = Blob(id=l[2]) + i.path = ' '.join(l[3:]) + #if self.path and self.path != '/': + # i.path = self.path + '/' + i.path + i.name=i.path + i.type = 'blob' + blob_objs.append(i) return render_to_response('git_browse/tree.html', dict(object=therepo, |