- publishing free software manuals
Version Management with CVS - the CVS manual
by Per Cederqvist et al.
Paperback (6"x9"), 216 pages, 8 figures
ISBN 0954161718
RRP £19.95 ($29.95)

Get a printed copy>>>

B.4.3.1 Editinfo example

The following is a simple example of an ‘editinfo’ file, together with the corresponding ‘rcsinfo’ file, the log message template and an editor script. We begin with the log message template. We want to always record a bug-id number on the first line of the log message. The rest of the log message is free text. The following template is found in the file ‘/usr/cvssupport/tc.template’.


The script ‘/usr/cvssupport/bugid.edit’ is used to edit the log message.

#       bugid.edit filename
#  Call $EDITOR on FILENAME, and verify that the
#  resulting file contains a valid bugid on the first
#  line.
if [ "x$EDITOR" = "x" ]; then EDITOR=vi; fi
if [ "x$CVSEDITOR" = "x" ]; then CVSEDITOR=$EDITOR; fi
until head -1|grep '^BugId:[ ]*[0-9][0-9]*$' < $1
do  echo -n  "No BugId found.  Edit again? ([y]/n)"
    read ans
    case ${ans} in
        n*) exit 1;;

The ‘editinfo’ file contains this line:

^tc     /usr/cvssupport/bugid.edit

The ‘rcsinfo’ file contains this line:

^tc     /usr/cvssupport/tc.template
ISBN 0954161718Version Management with CVS - the CVS manualSee the print edition