You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Peter McNab <mc...@melbpc.org.au> on 2005/04/17 09:34:53 UTC

Pre-commit hook %CMDCDMLINE%format

While testing a pre-commit hook batch file on NT4 I have encountered an 
unusual looking command line format,
but it does work.

The batch file reports each commit attempt to a simple log file

@echo off
set path=%path%;c:\Program Files\Subversion\bin
Date /T >> D:\pre-commit.log
Time /T >> D:\pre-commit.log
@echo %CMDCMDLINE% >> D:\pre-commit.log
SVNLOOK.exe log -t "%2" "%1" | grep.exe "[a-zA-Z0-9]" > nul || exit 1
@echo Committed OK >> D:\pre-commit.log
exit 0

The resultant output looks like this

Sun 17/04/2005
 2:07a
C:\WINNT\system32\cmd.exe /C ""D:\svn\SourceTree\hooks\pre-commit.bat" 
D:^\svn/SourceTree 140-1"
Committed OK

The repository is in the directory D:\svn\SourceTree

So the question is:-
Is the format of the %CMDCMDLINE%  part "D:^\svn/SourceTree"  as shown 
expected?

Peter



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Pre-commit hook %CMDCDMLINE%format

Posted by Max Bowsher <ma...@ukf.net>.
Peter McNab wrote:
> While testing a pre-commit hook batch file on NT4 I have encountered an
> unusual looking command line format,
> but it does work.
> 
> The batch file reports each commit attempt to a simple log file
> 
> @echo off
> set path=%path%;c:\Program Files\Subversion\bin
> Date /T >> D:\pre-commit.log
> Time /T >> D:\pre-commit.log
> @echo %CMDCMDLINE% >> D:\pre-commit.log
> SVNLOOK.exe log -t "%2" "%1" | grep.exe "[a-zA-Z0-9]" > nul || exit 1
> @echo Committed OK >> D:\pre-commit.log
> exit 0
> 
> The resultant output looks like this
> 
> Sun 17/04/2005
> 2:07a
> C:\WINNT\system32\cmd.exe /C ""D:\svn\SourceTree\hooks\pre-commit.bat"
> D:^\svn/SourceTree 140-1"
> Committed OK
> 
> The repository is in the directory D:\svn\SourceTree
> 
> So the question is:-
> Is the format of the %CMDCMDLINE%  part "D:^\svn/SourceTree"  as shown
> expected?

Yes.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org