aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/git_browse/models.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@manus.(none)>2007-08-08 03:23:36 -0400
committerbnewbold <bnewbold@manus.(none)>2007-08-08 03:23:36 -0400
commit9581828aa8489b7f09f1f6bf627faf231789cf84 (patch)
tree882087776d25a205506e02bf4a301359522afee4 /bn_django/git_browse/models.py
parenta891065a0447396a89fd03e4f038ca2e996a68aa (diff)
downloadbnewnet-9581828aa8489b7f09f1f6bf627faf231789cf84.tar.gz
bnewnet-9581828aa8489b7f09f1f6bf627faf231789cf84.zip
zip downloads of tree-like objects
Diffstat (limited to 'bn_django/git_browse/models.py')
-rw-r--r--bn_django/git_browse/models.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/bn_django/git_browse/models.py b/bn_django/git_browse/models.py
index 2af2c98..b2e62df 100644
--- a/bn_django/git_browse/models.py
+++ b/bn_django/git_browse/models.py
@@ -110,6 +110,8 @@ class Tree(models.Model):
import commands
if (not self.id): return
+ GITPREFIX = self.repo.getGITPREFIX()
+
self.id = self.id.strip()
tree_ls = commands.getoutput(GITPREFIX + ' ls-tree --full-name ' \
+ self.id)
@@ -127,12 +129,12 @@ class Tree(models.Model):
t.name = t.path
tree_objs.append(t)
if l[1] == 'blob':
- i = Item(id=l[2])
- i.path = ' '.join(l[3:])
+ b = Blob(id=l[2])
+ b.path = ' '.join(l[3:])
if self.path and self.path != '/':
- i.path = self.path + '/' + i.path
- i.name=i.path
- blob_objs.append(i)
+ b.path = self.path + '/' + b.path
+ b.name=b.path
+ blob_objs.append(b)
self.tree_objs = tree_objs
self.blob_objs = blob_objs
self.all_objs = tree_objs + blob_objs