Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TortoiseSVN client pre commit hook to check the contents of file being committed

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?

like image 828
Darshan Mehta Avatar asked Mar 22 '23 06:03

Darshan Mehta


1 Answers

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.

like image 164
CrazyMORF Avatar answered Apr 05 '23 22:04

CrazyMORF