mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
pass nodeid to mercurial rest hook
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# registration .hg/hgrc:
|
||||
#
|
||||
# [hooks]
|
||||
# incoming = python:scmhooks.callback
|
||||
# changegroup.scm = python:scmhooks.callback
|
||||
#
|
||||
|
||||
import os, sys, urllib
|
||||
@@ -19,6 +19,7 @@ if len(pythonPath) > 0:
|
||||
baseUrl = "${url}"
|
||||
|
||||
def callback(ui, repo, hooktype, node=None, source=None, **kwargs):
|
||||
url = baseUrl + os.path.basename(repo.root) + "/" + hooktype
|
||||
conn = urllib.urlopen(url);
|
||||
# todo validate (if conn.code == 200:)
|
||||
if node != None:
|
||||
url = baseUrl + os.path.basename(repo.root) + "/" + hooktype + "?node=" + node
|
||||
conn = urllib.urlopen(url);
|
||||
# todo validate (if conn.code == 200:)
|
||||
|
||||
Reference in New Issue
Block a user