2 # Put this script and cvs-modified-files.pl into your PATH (~bin is good) and
4 # export CVSEDITOR=cvsdiffclient
6 # in your .bashrc and you will get a nice bunch of CVS commit reminders:
7 # <merge/land tag information>
12 # Remember to remove the leading "CVS: " part of the comment before saving
13 # your commit comment if you want those entries to be saved.
15 [ -f .mergeinfo ] && . ./.mergeinfo
17 CVS_MODIFIED_FILES_PL=$(which cvs-modified-files.pl 2>/dev/null)
18 if [ -z "$CVS_MODIFIED_FILES_PL" ]; then
19 CVS_MODIFIED_FILES_PL=$(dirname $0)/cvs-modified-files.pl
21 FILES=$($CVS_MODIFIED_FILES_PL $1)
22 TMP=`mktemp /tmp/cvslog-XXXXXXXX`
25 CVS: did you test your fix properly (acc-sm.sh, or as needed)?
26 CVS: did you update the ChangeLog for a bug fix?
27 CVS: did you verify/update affected user documentation?
28 CVS: Remove "CVS:" from lines below to include in commit message
30 [ -f .mergeinfo ] && . .mergeinfo
31 [ -z "$PARENT" -a -f lustre/.mergeinfo ] && . lustre/.mergeinfo
32 if [ "$PARENT" ]; then
33 [ "$OPERATION" ] || OPERATION=Update
34 [ "$OPERWHERE" ] || OPERWHERE=from
35 echo "CVS: $OPERATION $child $OPERWHERE $parent ($date)" >> $TMP
37 [ -r CVS/Tag ] && TAG=CVS/Tag
38 [ -z "$TAG" -a -r lustre/CVS/Tag ] && TAG=lustre/CVS/Tag
39 [ "$TAG" ] && BRANCH="`sed 's/^T//' $TAG`" || BRANCH="HEAD"
40 echo "CVS: Branch $BRANCH" >> $TMP
42 # We can't just put these into the commit template without the leading
43 # "CVS: ", otherwise exiting the commend edit would still leave a valid
44 # comment in the file and the commit will still be done. We need to
45 # make a file without valid comments to allow the commit to be aborted.
57 if [ "${FILES:+have_files}"x = have_filesx ]; then
58 echo Diffing $1 : $FILES
59 cvs diff -wbBup $FILES 2>/dev/null | sed "s/^/CVS: /" >>$1
61 #gnuclient $1 || vi $1
62 [ "$EDITOR" ] || EDITOR=vi