made git pull thread safe, thanks Andrew

This commit is contained in:
mdipierro
2012-07-28 22:37:19 -05:00
parent eea0fc4b26
commit 4da505ca1f
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-07-28 21:32:56) dev
Version 2.00.0 (2012-07-28 22:37:15) dev
+1 -3
View File
@@ -1697,8 +1697,7 @@ def git_push():
try:
repo = Repo(os.path.join(apath(r=request),app))
index = repo.index
os.chdir(os.path.join(apath(r=request),app))
index.add('*')
index.add([apath(r=request)+app+'/*'])
new_commit = index.commit(form.vars.changelog)
origin = repo.remotes.origin
origin.push()
@@ -1711,6 +1710,5 @@ def git_push():
logging.error("Unexpected error:", sys.exc_info()[0])
session.flash = T("Push failed, git exited abnormally. See logs for details.")
redirect(URL('site'))
os.chdir(apath(r=request))
return dict(app=app,form=form)