Get Action in pre-commit hook

satheesh
satheesh
Hi,  I need Action(A or M) in pre-commit hook.  I going to check file content using svnlook cat, if file contains certain string(some ******) i need to block the commit if it is add operation(Action). otherwise do nothing.  thanks.

Last updated

satheesh
satheesh
thanks,    i have found the solution by using svnlook changed cmd    i have another question how can i checkout the single file from repository ???    like svn co URL(Url of particular file not a path) path(path to localfile)    thanks,
andyl
andyl
satheesh;122498thanks,    i have found the solution by using svnlook changed cmd    i have another question how can i checkout the single file from repository ???    like svn co URL(Url of particular file not a path) path(path to localfile)    thanks,
   You cannot check out a single file from the repository. The smallest unit that can be checked out is a directory.    You can get a file from the repository with svn cat or svn export, but it will not be linked back to the repository in a meaningful way.
philip
philip
If you want the file contents associated with the transaction in a pre-commit use "svnlook cat -t TXN"
satheesh
satheesh
Thanks of quick reply,    Is it possible to --bypass the hooks while committing the file using svn commit ???
andyl
andyl
satheesh;122587Thanks of quick reply,    Is it possible to --bypass the hooks while committing the file using svn commit ???
   A hook script cannot be bypassed unless it is coded to exit without doing anything under specific circumstances.

1-6 of 6

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.