mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
ignore global proxy settings for mercurial hooks
This commit is contained in:
@@ -48,7 +48,11 @@ def callHookUrl(ui, repo, hooktype, node):
|
|||||||
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 = urllib2.urlopen(url, data);
|
# open url but ignore proxy settings
|
||||||
|
proxy_handler = urllib2.ProxyHandler({})
|
||||||
|
opener = urllib2.build_opener(proxy_handler)
|
||||||
|
req = urllib2.Request(url, data)
|
||||||
|
conn = opener.open(req)
|
||||||
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" )
|
||||||
abort = False
|
abort = False
|
||||||
|
|||||||
Reference in New Issue
Block a user