ignore global proxy settings for mercurial hooks

This commit is contained in:
Sebastian Sdorra
2013-04-17 21:07:22 +02:00
parent d2f038b056
commit 6d96cbd872

View File

@@ -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