Problems encountered:
In the team development, there are always some people are very personality, check in when everything is wood, sometimes to rollback the repository brings a lot of difficulties. In order to solve this problem, we can set the check-in on the SVN server side must fill in the comment, otherwise it is not allowed to check in.
Workaround:
Select the repository you want to set up:
Add the following command to the Pre-commit:
@echo Offsetlocalset repos=%1set txn=%2rem Check this logmessage contains at least charactersrem ..... Represents a 5 character Svnlook log "%repos%"-T "%txn%" | Findstr "..." > Nulif%errorlevel% gtr 0 goto errexit 0:errecho Note length is insufficient! Please enter a comment with at least 5 characters! Please re-fill in the comments! 1>&2exit 1
Actually look Pre-commit's name can also guess, this is the thing that is executed before commits, here, we submit before we commit to check whether the character length is greater than 5, if not greater than, will not allow check-in.
In this way, when a bear child again without comment checkin, will be repeatedly asked to input comments.
SVN: note must be filled in when server-side settings are submitted