aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/git_wiki
diff options
context:
space:
mode:
authorbnewbold <bnewbold@manus.(none)>2007-03-04 12:33:37 -0800
committerbnewbold <bnewbold@manus.(none)>2007-03-04 12:33:37 -0800
commit3a0e84add08b0028d4b08728073ddf9945dc3be0 (patch)
tree338327b8b1e67eb70b4a6e9893bb945f5c07a20a /bn_django/git_wiki
parent7444d8455bff2d0de4ec48bee9e3ab4e843ca909 (diff)
downloadbnewnet-3a0e84add08b0028d4b08728073ddf9945dc3be0.tar.gz
bnewnet-3a0e84add08b0028d4b08728073ddf9945dc3be0.zip
added GITWIKI_DIR var and added new knowledge to frontpage
Diffstat (limited to 'bn_django/git_wiki')
-rw-r--r--bn_django/git_wiki/models.py12
-rw-r--r--bn_django/git_wiki/settings.py3
2 files changed, 8 insertions, 7 deletions
diff --git a/bn_django/git_wiki/models.py b/bn_django/git_wiki/models.py
index ae9ef79..060e9d5 100644
--- a/bn_django/git_wiki/models.py
+++ b/bn_django/git_wiki/models.py
@@ -150,10 +150,10 @@ def fromslug(reqslug):
import commands
if reqslug == '' or reqslug == '/':
- f = open(GITWIKI_BASE + '/HEAD','r')
+ f = open(GITWIKI_DIR + '/HEAD','r')
head = f.readline().strip().split()[1]
f.close()
- f = open(GITWIKI_BASE + '/'+head,'r')
+ f = open(GITWIKI_DIR + '/'+head,'r')
hash = f.readline().strip()
f.close()
ret = Tree(id=hash)
@@ -198,13 +198,13 @@ def fromslug(reqslug):
def reposcan():
import os
heads = dict()
- for h in os.listdir(GITWIKI_BASE + '/refs/heads/'):
- f = open(GITWIKI_BASE + '/refs/heads/' + h,'r')
+ for h in os.listdir(GITWIKI_DIR + '/refs/heads/'):
+ f = open(GITWIKI_DIR + '/refs/heads/' + h,'r')
heads[h.strip()] = f.readline().strip()
f.close()
tags = dict()
- for t in os.listdir(GITWIKI_BASE + '/refs/tags/'):
- f = open(GITWIKI_BASE + '/refs/tags/' + t,'r')
+ for t in os.listdir(GITWIKI_DIR + '/refs/tags/'):
+ f = open(GITWIKI_DIR + '/refs/tags/' + t,'r')
tags[t.strip()] = f.readline().strip()
f.close()
return (heads, tags)
diff --git a/bn_django/git_wiki/settings.py b/bn_django/git_wiki/settings.py
index ed07f53..965ac26 100644
--- a/bn_django/git_wiki/settings.py
+++ b/bn_django/git_wiki/settings.py
@@ -9,5 +9,6 @@ GITWIKI_NAME = ''
# fill path to the git command
GITCOMMAND = '/usr/local/bin/git'
+GITWIKI_DIR = str(GITWIKI_BASE) + '/' + str(GITWIKI_NAME) + '.git'
GITPREFIX = 'cd ' +str(GITWIKI_BASE) + '; ' + str(GITCOMMAND) + ' --git-dir=' \
- + str(GITWIKI_BASE) + '/' + GITWIKI_NAME + '.git'
+ + str(GITWIKI_DIR)