I need to implement an SVN pre-commit hook which executes a script that itself is stored in SVN.
I can use the svn cat
command to pipe that script to the Python interpreter, as follows:
svn cat file://$REPO/trunk/my_script.py | python - --argument1 --argument2
However, my_script.py
itself requires data to be piped on STDIN.
That data is not stored in a file; it is stored on the network. I would prefer not to have to download the data to a temporary file, as normally I could pipe it to a Python program:
curl http://example.com/huge_file.txt | python my_script.py
I'm not sure how to combine both of these pipes.