CVS pre-commit check Ask Question. Asked 7 years, 11 months ago. Active 7 years, 11 months ago. Viewed 2k times. Improve this question. Add a comment. Active Oldest Votes. Improve this answer. Sid Sid 7, 1 1 gold badge 26 26 silver badges 41 41 bronze badges. Sign up or log in Sign up using Google. The command will be run in the root of the workspace containing the new versions of any files the user would like to modify commit , or in a copy of the workspace on the server see Remote repositories.
If a file is being removed, there will be no copy of the file under the current directory. If a file is being added, there will be no corresponding archive file in the repository unless the file is being resurrected.
The program invoked on the right side receives the log message on its standard input; it can do whatever it wants with that input. The program on the right side can also take an arbitrary number of command-line arguments. In the second line, any commit in a repository subdirectory containing the string ou will invoke the imaginary ou-notify.
The third line invokes the equally imaginary default-notify. Here is an example:. Then getting the module creates a subdirectory for each such module, in the directory containing the module. For example, if modules contains. For example, the command.
Either regular modules or ampersand modules can contain options, which supply additional information concerning the module. Specify a program prog to run whenever files in a module are exported. Specify a program prog to run whenever files in a module are checked out.
See How the modules file "program options" programs are run for information on how prog is called. Assign a status to the module. This option has no other meaning. You can use this option for several things besides status: for instance, list the person that is responsible for this module. Specify a program prog to run whenever files in a module are tagged with rtag.
It is not run when tag is executed. You should also see see section How the modules file "program options" programs are run about how the "program options" programs are run. If using remote access methods pserver, ext, etc. The path is searched for this program. If using "local access" on a local or remote NFS file system, i. Wrappers refers to a CVS feature which lets you control certain settings based on the name of the file which is being operated on.
CVS will provide the user with the two versions of the files, and require the user using mechanisms outside CVS , to insert any necessary changes. See Handling binary files , for more on binary files. The files described in this section provide other, more flexible, ways to run programs whenever something is committed. There are three kinds of programs that can be run on commit. They are specified in files in the repository, as described below. The following table summarizes the file names and the purpose of the corresponding programs.
The program is responsible for checking that the commit is allowed. If it exits with a non-zero exit status the commit will be aborted. The specified program is used to evaluate the log message, and possibly verify that it contains all required fields. The specified program is used to edit the log message, and possibly verify that it contains all required fields.
The specified program is called when the commit is complete. It receives the log message and some additional information and can store the log message in a file, or mail it to appropriate persons, or maybe post it to a local newsgroup, or… Your imagination is the limit! The purpose of the files are described later on. The common syntax is described here. Blank lines are ignored. Long lines unfortunately can not be broken in two parts in any way.
The first regular expression that matches the current directory name in the repository is used.
0コメント