mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
abort mercurial transaction if pre receive hook fails
This commit is contained in:
@@ -46,7 +46,6 @@ def callback(ui, repo, hooktype, node=None, source=None, **kwargs):
|
||||
url = baseUrl + os.path.basename(repo.root) + "/" + hooktype
|
||||
data = urllib.urlencode({'node': node, 'challenge': challenge})
|
||||
conn = urllib.urlopen(url, data);
|
||||
if conn.code == 200:
|
||||
print( "scm-hook executed successfully" )
|
||||
else:
|
||||
if conn.code >= 400:
|
||||
print( "scm-hook failed with error code " + str(conn.code) )
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user