SVN enforces elevation of comments

Source: Internet
Author: User


SVN enforces elevation of comments. This requirement can be simply implemented using the svn pre-commit hook. Www.2cto.com enter the hooks directory of the repository, find the pre-commit.tmpl file, rename, remove the suffix. tmpl. Edit the pre-commit file: $ SVNLOOK log-t "$ TXN" "$ REPOS" | grep "[a-zA-Z0-9]">/dev/null | exit 1 commit-access-control.pl "$ REPOS" "$ TXN" commit-access-control.cfg | | comment out the three lines of exit 1 (with the # symbol added before ), add the following lines at this location: www.2cto.com LOGMSG = '$ SVNLOOK log-t "$ TXN" "$ REPOS" | grep "[a-zA-Z0-9]" | wc-C' if ["$ LOGMSG"-lt 5]; # The comments must not be less than five characters. You can customize then echo-e "nLog message cann' t be empty! You must input more than 5 chars as comment !. "1> & 2 exit 1 fi. Do not forget to add the execution permission.

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.