SVN: note must be filled in when server-side settings are submitted

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.