Home
About
Projects
 CVS
 Contributors
 Online
 Download
 RCS
 Texinfo
 Texi2HTML
History
Tools
Support the Project
 
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

C.6.1 Editinfo example

The following is a little silly example of a `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 log message is free text. The following template is found in the file `/usr/cvssupport/tc.template'.

 
BugId:

The script `/usr/cvssupport/bugid.edit' is used to edit the log message.

 
#!/bin/sh
if [ "x$EDITOR" = "x" ]; then EDITOR=vi; fi
if [ "x$CVSEDITOR" = "x" ]; then CVSEDITOR=$EDITOR; fi
$CVSEDITOR $1
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;;
    esac
    $CVSEDITOR $1
done

The `editinfo' file contains this line:

 
^tc     /usr/cvssupport/bugid.edit

The `rcsinfo' file contains this line:

 
^tc     /usr/cvssupport/tc.template

Sun Aug 26 18:54:18 UTC 2001 © 1999, 2000, 2001 by Manual Translation Project webmaster@manual-translation-project.org