svnlook

Detecting branch reintegration or merge in pre-commit script

冷暖自知 提交于 2019-12-22 03:49:20
问题 Within a pre-commit script, is it possible (and if so, how) to identify commits stemming from an svn merge ? svnlook changed ... shows files that have changed, but does not differentiate between merges and manual edits. Ideally, I would also like to differentiate between a standard merge and a merge --reintegrate . Background: I'm exploring the possibility of using pre-commit hooks to enforce SVN usage policies for our project. One of the policies state that some directories (such as /trunk )

Pre-commit hook. Svnlook can't find the path “.tmp\format”

倖福魔咒の 提交于 2019-12-12 18:36:20
问题 I've made pre-commit.bat script, but it doesn't work properly. I want it to prevent sending commits without proper message("Ticket xxxxx"). Here's the code: set REPOS=%1 set TXN=%2 svnlook log %REPOS% -t %TXN% | findstr /r "^Ticket [0-9]{5}" > nul || echo "Follow the format [Ticket xxxxx ...]" 1>&2 && exit 1 exit 0 And here's what I get when I try to commit: The hook script returned an error: svnlook: E720003: Can't open file 'C:\Users\EDUARD~5.LI\AppData\Local\Temp\3\svn4FA6.tmp\format': The

Getting log message from svnlook via windows batch

江枫思渺然 提交于 2019-11-29 15:25:57
I try to prepare a post-commit hook for my svn repository. Therefore i need the log message from the last commit which I get with the command svnlook log -r %REV% %REPOS% . Filling the snippet with the appropriate params I get the following multline log message: This is my transaction. This works well so far. Now I put this in a .bat file: @ECHO OFF REM just for testing purpose... SET REPOS=C:\repo SET REV=40 FOR /F %%i in ('svnlook log -r %REV% %REPOS%') do SET VAR=%%i ECHO %VAR% When I execute the script only the last line transaction. is echoed. The for-loop is a snippet from which I

Getting log message from svnlook via windows batch

独自空忆成欢 提交于 2019-11-28 09:08:44
问题 I try to prepare a post-commit hook for my svn repository. Therefore i need the log message from the last commit which I get with the command svnlook log -r %REV% %REPOS% . Filling the snippet with the appropriate params I get the following multline log message: This is my transaction. This works well so far. Now I put this in a .bat file: @ECHO OFF REM just for testing purpose... SET REPOS=C:\repo SET REV=40 FOR /F %%i in ('svnlook log -r %REV% %REPOS%') do SET VAR=%%i ECHO %VAR% When I