made git pull thread safe, thanks Andrew
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.0 (2012-07-28 21:32:56) dev
|
Version 2.00.0 (2012-07-28 22:37:15) dev
|
||||||
|
|||||||
@@ -1697,8 +1697,7 @@ def git_push():
|
|||||||
try:
|
try:
|
||||||
repo = Repo(os.path.join(apath(r=request),app))
|
repo = Repo(os.path.join(apath(r=request),app))
|
||||||
index = repo.index
|
index = repo.index
|
||||||
os.chdir(os.path.join(apath(r=request),app))
|
index.add([apath(r=request)+app+'/*'])
|
||||||
index.add('*')
|
|
||||||
new_commit = index.commit(form.vars.changelog)
|
new_commit = index.commit(form.vars.changelog)
|
||||||
origin = repo.remotes.origin
|
origin = repo.remotes.origin
|
||||||
origin.push()
|
origin.push()
|
||||||
@@ -1711,6 +1710,5 @@ def git_push():
|
|||||||
logging.error("Unexpected error:", sys.exc_info()[0])
|
logging.error("Unexpected error:", sys.exc_info()[0])
|
||||||
session.flash = T("Push failed, git exited abnormally. See logs for details.")
|
session.flash = T("Push failed, git exited abnormally. See logs for details.")
|
||||||
redirect(URL('site'))
|
redirect(URL('site'))
|
||||||
os.chdir(apath(r=request))
|
|
||||||
return dict(app=app,form=form)
|
return dict(app=app,form=form)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user