summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2010-07-21 18:12:30 -0400
committerGuillaume Seguin <guillaume@segu.in>2010-07-21 18:12:30 -0400
commit3d3f562ef819c40bb5a08499529f45eecd3e5fb4 (patch)
treee7a10c1710922af93ca486a9b94d45956fda4a8c
parent13d9dbeeea7088dacce4f8467ff1b9cd91b671d0 (diff)
downloadblogit-3d3f562ef819c40bb5a08499529f45eecd3e5fb4.tar.gz
blogit-3d3f562ef819c40bb5a08499529f45eecd3e5fb4.tar.bz2
More fixes on produce script
-rw-r--r--raw_produce6
1 files changed, 3 insertions, 3 deletions
diff --git a/raw_produce b/raw_produce
index a374bb0..d68d30e 100644
--- a/raw_produce
+++ b/raw_produce
@@ -5,7 +5,7 @@ import os
import sys
if "GIT_DIR" in os.environ:
- repo = os.environ["GIT_DIR"]
+ repo = os.path.abspath (os.path.join (os.environ["GIT_DIR"], ".."))
else:
repo = os.path.dirname (os.path.abspath (__file__))
@@ -64,11 +64,11 @@ posts = []
for k in range (10):
p = subprocess.Popen (["git", "log", "--no-merges",
"--pretty=format:" + format,
- "HEAD~%d..HEAD~%d" % (k + 1, k)],
+ "--skip=%d" % k, "--max-count=1"],
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
out, _ = p.communicate ()
- if p.returncode != 0:
+ if p.returncode != 0 or not out.strip ():
break
out = out.split ("\n", len (bits_list))
bits = dict ([(bits_list[i], out[i]) for i in range (len (bits_list))])