implement new hook api for mercurial repositories

This commit is contained in:
Sebastian Sdorra
2013-07-22 11:40:03 +02:00
parent 42b9f41e6b
commit 86bd700bf6
8 changed files with 668 additions and 54 deletions

View File

@@ -55,6 +55,9 @@ def callHookUrl(ui, repo, hooktype, node):
conn = opener.open(req)
if conn.code >= 200 and conn.code < 300:
ui.debug( "scm-hook " + hooktype + " success with status code " + str(conn.code) + "\n" )
for line in conn:
if line.startswith("_e") or line.startswith("_n"):
ui.warn(line[2:]);
abort = False
else:
ui.warn( "ERROR: scm-hook failed with error code " + str(conn.code) + "\n" )