0

We use subversion as a source control solution; however couple of my team mates aren't very faithful when it comes to provide a comment while checking in files.

I would like to put a couple of validation like...

A. A comment is mandatory with at least a specified number of characters. B. Few words must be present in the checking in comment. C. spaces in file names are rejected.

Is there a way to do so? I tried searching for a solution but it seems that isn't going that well...

bahrep
  • 29,961
  • 12
  • 103
  • 150
Bharat Sinha
  • 13,973
  • 6
  • 39
  • 63

1 Answers1

2

You can employ a pre-commit hook to check if a comment comes with the commit and which files are altered or added.

A pre-commit hook script obtains the repository that's to be changed and a transaction identifier. Both these can be used with svnlook:

svnlook log /path/to/repo --transaction <txid>

This will echo the commit message.

Linus Kleen
  • 33,871
  • 11
  • 91
  • 99