views:

61

answers:

3

There is a desire in one of my teams to force user's to provide a log entry on check-in.

I think the only available approach is to create a custom repository hook to reject a check-in. Is this correct ? Any existing examples or commentary on the approach ?

+1  A: 

I think the commit script hook is the way to go, but that will not prevent users to write "asdfasdf" in the comment field just to check-in stuff.

but that's another subject.

Max.

Max
+6  A: 

pre-commit hook is the only way that I find to reject empty commit logs.

See this:

http://code.google.com/p/subversion-pre-commit-hook/

ryanprayogo
+1. Also, you can get very sophisticated in the commit hook. We audit ours to ensure that there is a valid change request or defect ID in the comment (there's a particular format that we use, so it can be parsed). If you don't include a valid change request or defect ID, you can't check in. period.
Chris Thornton
+3  A: 

From the TortoiseSVN docs:

TortoiseSVN uses properties to control some of its features. One of those properties is the tsvn:logminsize property.

If you set that property on a folder, then TortoiseSVN will disable the OK button in all commit dialogs until the user has entered a log message with at least the length specified in the property.

splash
This is fairly helpful when taking the management approach as it gets away from the individual with the "oops, I forgot" syndrome.
Jim Rush