mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
rename python hook
This commit is contained in:
@@ -147,7 +147,7 @@ public class HgHookScriptFilter extends HttpFilter
|
||||
|
||||
IOUtil.mkdirs(cgiDirectory);
|
||||
|
||||
File hgHookScript = new File(cgiDirectory, "hg-hook.py");
|
||||
File hgHookScript = new File(cgiDirectory, "scmhooks.py");
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
#!/usr/bin/env ${python}
|
||||
|
||||
#
|
||||
# registration .hg/hgrc:
|
||||
#
|
||||
# [hooks]
|
||||
# incoming = python:scmhooks.callback
|
||||
#
|
||||
|
||||
import os, sys, urllib
|
||||
|
||||
pythonPath = "${path}"
|
||||
@@ -11,7 +18,7 @@ if len(pythonPath) > 0:
|
||||
|
||||
baseUrl = "${url}"
|
||||
|
||||
def scmhook(ui, repo, hooktype, node=None, source=None, **kwargs):
|
||||
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:)
|
||||
|
||||
Reference in New Issue
Block a user