AFAICT, a ticket is only supposed to be closed if the commit message starts with "fixes #N" or "closes #N" (where N is the ticket number), so it does not seem to work as expected.
The hook script behaviour should be the same wherever you commit your changes from (TSVN, svn, etc.) Regards, Manu On 6/14/06, Per Rasmussen <[EMAIL PROTECTED]> wrote:
I tried your suggestion and it allmost works. If I make a commit without filling the issue box in TSVN it closes the ticket as it should. If I do put a number in the issue box it doesn't close the ticket upon commit, but if I afterwards invoke the bat file from a command line with the revision number of the previous commit, it DOES close the ticket. Like this: C:\Cepa\Repositories\cepasoft\hooks>post-commit.bat C:\Cepa\Repositories\cepasoft 58 Shouldn't this be equivalent to the actual commit? >From: "Emmanuel Blot" <[EMAIL PROTECTED]> >Reply-To: [email protected] >To: [email protected] >Subject: Re: [Trac] Problem with trac-post-commit-hook >Date: Wed, 14 Jun 2006 17:30:03 +0200 > >The trouble is that FOR iterates on each line of the command output, >so if you log message is a multiline message, "SET LOG=%%G" will be >called for each line of the log message > >You could do something like this: >@ECHO OFF >SET SVNLOOK=C:\Programs\Subversion\bin\svnlook >SET REV=94 >SET REPOS="d:\project" >SET MSG= >GOTO message > >:concat >IF "z%MSG%"=="z" (SET MSG=%*) ELSE (SET MSG=%MSG% %*) >GOTO :eof > >:message >FOR /F "tokens=* delims== eol=;" %%G IN ('%SVNLOOK% log -r %REV% >%REPOS%') DO CALL :concat %%G > >ECHO Message: %MSG% > >Although this syntax discards the line break and replace them with >space characters. >I really have no idea about how to deal with LF with the M$ >interpreter. Batch file syntax is simply ugly. > >Cheers, >Manu >_______________________________________________ >Trac mailing list >[email protected] >http://lists.edgewall.com/mailman/listinfo/trac _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ Trac mailing list [email protected] http://lists.edgewall.com/mailman/listinfo/trac
-- Manu _______________________________________________ Trac mailing list [email protected] http://lists.edgewall.com/mailman/listinfo/trac
