32,33d31
< # 
< # LINUX:
47,71d44
< # WINDOWS: sample of post-commit.bat (must use temporary files for the log message)
< #
< ##SET REPOS=%1
< ##SET REV=%2
< ##
< ##::-----------------------------
< ##::Call the TRAC post-commit hook
< ##::
< ##SET TRAC_ENV=C:\somewhere\trac\project
< ##SET LOG_FILE=%TEMP%.\svnfileR-%REV%
< ##SET AUT_FILE=%TEMP%.\svnfileA-%REV%
< ##
< ##svnlook log -r %REV% %REPOS%>%LOG_FILE%
< ##svnlook author -r %REV% %REPOS%>%AUT_FILE%
< ##
< ##:: SET THE AUTHOR FROM THE FILE. The file is expected to contain only one line with this value
< ##FOR /F %%A IN (%AUT_FILE%) DO SET AUTHOR=%%A
< ##
< ##python [trac-path]\contrib\trac-post-commit-hook.py -p "%TRAC_ENV%" -r "%REV%" -u "%AUTHOR%" -m "file:%LOG_FILE%"
< ##DEL %LOG_FILE%
< ##DEL %AUT_FILE%
< ##::
< ##::-----------------------------
< ##
< #
144d116
<         msg = self._readFromFile( msg )
181,194d152
<     def _readFromFile(self, message):
<         """ Ivan Melnychuk: SOLUTION FOR WINDOWS SYSTEMS:
<         Windows does not support returning values from script.
<         Therefore temporary files may be used to keep some information like commit message
<         If the 'message' starts with 'file:', and the file with indicated name exists, then read the text message from the file rather then using the text directly
<         Even though actual message also may start with such prefix, it is very unlikely that the file exists with such a name by accident
<         """
<         if message[:5] == 'file:' and os.path.exists( message[5:] ):
<             f = open( message[5:], 'r' )
<             message = f.read()
<             f.close()
<             return message
<         return message;
< 
202c160
< 
---
>                         
208c166
< 
---
>     

