improve creation of mercurial hook script

This commit is contained in:
Sebastian Sdorra
2011-07-24 13:36:19 +02:00
parent 0811b7590a
commit 20b62974f4
5 changed files with 149 additions and 232 deletions

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env ${python}
#
# registration .hg/hgrc:
#
@@ -7,14 +5,7 @@
# changegroup.scm = python:scmhooks.callback
#
import os, sys, urllib
pythonPath = "${path}"
if len(pythonPath) > 0:
pathParts = pythonPath.split(os.pathsep)
for i in range(len(pathParts)):
sys.path.insert(i, pathParts[i])
import os, urllib
baseUrl = "${url}"
challenge = "${challenge}"