mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
merge with branch issue-163
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
# changegroup.scm = python:scmhooks.callback
|
# changegroup.scm = python:scmhooks.callback
|
||||||
#
|
#
|
||||||
|
|
||||||
import os, urllib
|
import os, urllib, urllib2
|
||||||
|
|
||||||
baseUrl = os.environ['SCM_URL']
|
baseUrl = os.environ['SCM_URL']
|
||||||
challenge = os.environ['SCM_CHALLENGE']
|
challenge = os.environ['SCM_CHALLENGE']
|
||||||
@@ -51,7 +51,7 @@ def callback(ui, repo, hooktype, node=None, source=None, pending=None, **kwargs)
|
|||||||
url = baseUrl + hooktype
|
url = baseUrl + hooktype
|
||||||
ui.debug( "send scm-hook to " + url + " and " + node + "\n" )
|
ui.debug( "send scm-hook to " + url + " and " + node + "\n" )
|
||||||
data = urllib.urlencode({'node': node, 'challenge': challenge, 'credentials': credentials, 'repositoryPath': repo.root})
|
data = urllib.urlencode({'node': node, 'challenge': challenge, 'credentials': credentials, 'repositoryPath': repo.root})
|
||||||
conn = urllib.urlopen(url, data);
|
conn = urllib2.urlopen(url, data);
|
||||||
if conn.code >= 200 and conn.code < 300:
|
if conn.code >= 200 and conn.code < 300:
|
||||||
ui.debug( "scm-hook " + hooktype + " success with status code " + str(conn.code) + "\n" )
|
ui.debug( "scm-hook " + hooktype + " success with status code " + str(conn.code) + "\n" )
|
||||||
failure = False
|
failure = False
|
||||||
|
|||||||
Reference in New Issue
Block a user