SVN force add annotation script (for Windows)

Source: Internet
Author: User

D:/svnrepositories/projects/hooks

 

InHooksCreatePre-commit.bat:

 

@ Echo off

Setlocal

Set svn_bindir = C:/program files/visualsvn server/bin/

Set repos = % 1

Set txn = % 2

Rem check that logmessage contains at least 10 Characters

Svnlook log "% repos %"-T "% txn %" | findstr "......"> NUL

Endlocal

If % errorlevel % gtr 0 goto err

Exit 0

: Err

Echo please input Log message, at least 10 characters. Commit aborted! 1> & 2

Exit 1

 

in this way, when submitting files in this warehouse, you need to forcibly enter comments.

from here, findstr dos the command is so powerful.

actually findstr there is a pattern string in the quotation marks, 10 points represent ten strings.

Find/sRecursively searches for a string in the current directory.

Find/s hello *. txt

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.