I'm trying to write a SVN post-lock script on windows.I want to use a batch script to call a python script and pass REPO, USER and paths of locked files as its args.
It's said in the .tmpl file that both REPO and USER are predefined arguments and locked paths are passed via STDIN, so I tried this in my .bat file:
@echo off
set REPOS=%1
set USER=%2
set /p files=
C:\Python27\python.exe C:\test.py %REPOS% %USER% %files%
It works fine if I lock a single file. But if I lock multiple files with a single svn lock command, I can only get the first path with 'set /p files='.
How can I get a full list of locked paths with batch script? Thank you for your help!
The Python process will inherit the stdin of its parent process (the shell running the batch script) so just defer the task of reading it to your Python program instead — where it will be much easier to do.