Loginfo. RB: Send a change email automatically

Source: Internet
Author: User

Http://jdev.tw/blog/248/loginforb%EF%BC%9A%E8%87%AA%E5%8B%95%E5%AF%84%E9%80%81%E4%BF% AE %E6%94%B9%E8%A8%98%E9%8C%84%E4%BF%A1%E4%BB%B6

 

There is a special CVS Control item in the repository of the cvs host: cvsroot, which stores many small cases that control CVS operations, maybe it can be written to CVS.Event HandlerFor example:LoginfoIt is the response that will be obtained after the commit and commit log messages.

 

In loginfo, every column except the solution (opening the well) will be retrieved by the CVS program, determine whether to execute subsequent commands in the commit case of the commit Based on the starting principle. For example:

# The opening position of a well is the vertical line.
Modular Command [metric data 1 [metric data 2 [... metric data N]…]

The modulo expression uses the regular expression to show the patterns that match the rows to be written. For example:

^ inetpub indicates the model (Category) Starting with inetpub
all indicates that all the mode groups match
default since the start of the first column of the rows that can be merged does not match, the command in the default column of the row is deleted.

The mode is followed by the command to begin the line. A useful command is Rob Partington's loginfo. RB is a ruby program used to produce mail. It sends the modified person, modified time, modified program, and other information to the relevant person who needs to be notified. The usage of loginfo. Rb is as follows:

# Usage: loginfo. RB cvsroot user 'cvs-log-string' mail_addresses
# [-D helo_domain] [-s smtp_server] [-P subject_prefix]
# [-S sender_address] [-r reply_to_address] [-x x_header_prefix]
# [-W cvsweb_url] [-C path_to_cvs] [-Qj]
#
#-D specify the domain to use in the SMTP session and in the mail header
# (Default: FQDN of the host)
#-S specify the SMTP server to mail
# (Default: "localhost ")
#-S specify the sender address for the mail
# (Default: User + "@" + helo_domain)
#-R specify the reply-to address for the mail
# (Default: None)
#-P specify the prefix for the mail subject (which will be surrounded
# By '[' and ']')
# (Default: "CVS ")
#-Q be quiet
#-X specify the prefix for the CVS informative Headers
# (Default: "X -")
#-W specify the URL of the Cvsweb with two @'s, one for a path, and
# The other for a query (e.g. "'HTTP: // A. B/Cvsweb. cgi @? Cvsroot = xyz &@'")
# (Default: None-No Cvsweb links will be added)
#-C specify the full path to CVS
# (Default: "/usr/bin/CVS ")
#-J enable Japan support (send mail in the JIS encoding)
# (Default: Disabled)

Example:

# Send the inetpub and the commit of the internal case of the Child object to the electronic component of the Graphic Language.
# % S is the logging message
^ Inetpub $ cvsroot/loginfo. RB $ cvsroot $ USER % sAdam@hotmail.com, bill@gmail.com, cathy@pchome.com.tw-S mail.box.com.tw-s cvs_logingo@mail.box.com.tw

To use loginfo. RB, you must install the ruby runtime environment. In addition, the preceding commands are executed on Linux, and some minor modifications are required for Windows runtime environments. In Windows, there is a Delphi program called cvsmailer, which can also be used to send modification records. However, I was unable to run normally when I was just logged on, you can also refer to it.

If you want to write and track changes to the program version, you can compile the program on your own, modify the program, log statement, and other information, so that you can use the SELECT statement for query later.

##

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.