Question

I want to write a pre commit hook in windows batch file which will check for specific string in the file being committed. If the string exists, the commit will fail. I have TortoiseSVN client installed. As it's tortoisesvn client, it does not have commands like 'svnlook' to fetch the list of files etc. I want that script to be executed for each and every file being committed/added.

I am newbie to these hooks. Can anyone please guide me with this?

Was it helpful?

Solution

May be this page will be helpful

  1. Client Side Hook Scripts
  2. TortoiseSVN pre-commit hook in C# - Save yourself some troubles!

Seems like you can use FIND batch command, because it produces errorcode when string in file is not found.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top