Jump to content

After-Checkin trigger not sending EOF?


Recommended Posts

I have implemented an after-checkin trigger which parses the changed files in order to kick off an automated build process. For some strange combination of changes (the failing checkin has updates, adds, ignores, renames, deletes) the python parsing the file list hangs while reading from stdin. It seems as though Plastic server is not sending an EOF. Fortunately this has only happened for one check-in, but I have yet to find a workaround. If I were on linux I could setup a SIGALRM to kill the read process after x seconds, but sadly I am on windows.

Any advice for tracking down the root-cause? Is it possible to fetch the file list using cm query and bypass stdin?

Link to comment
Share on other sites

Thanks for the advice. I ended up bypassing stdin and use cm find instead. In the batch file which calls the pythons script I replace the read from stdin with:

for /F "tokens=2,4,6 delims=:;@" %%A in ("%PLASTIC_CHANGESET%") do (

set CSID=%%A

set BRANCH=%%B

set REPO=%%C


cm find revision where changeset=%CSID% on repository '%REPO%' --format="{item}" --nototal> files.temp

python AutoBuild.py < files.temp

The only catch was that I had to copy my personal client.conf to Documents and Settings\Default User\Local Settings\Application Data\plastic\client.conf so the trigger would be able to use cm commands.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...