Whamcloud - gitweb
land b_groups onto HEAD:
[fs/lustre-release.git] / lustre / scripts / cvsdiffclient
1 #!/bin/bash
2 # Put this script and cvs-modified-files.pl into your PATH (~bin is good) and 
3 #
4 # export CVSEDITOR=cvsdiffclient
5 #
6 # in your .bashrc and you will get a nice bunch of CVS commit reminders:
7 # <merge/land tag information>
8 # b=<bug_number>
9 # r=<reviewed by>
10 #
11 # Remember to remove the leading "CVS: " part of the comment before saving
12 # your commit comment if you want those entries to be saved.
13
14 [ -f .mergeinfo ] && . ./.mergeinfo
15
16 FILES=`cvs-modified-files.pl $1`
17 TMP=`mktemp /tmp/cvslog-XXXXXXXX`
18 if [ -f $TMP ]; then
19         if [ -f .mergeinfo ]; then
20                 . .mergeinfo
21                 [ "$OPERATION" ] || OPERATION=Update
22                 [ "$OPERWHERE" ] || OPERWHERE=from
23                 echo "CVS: $OPERATION $child $OPERWHERE $parent ($date)" >> $TMP
24         fi
25         echo "CVS: did you update the ChangeLog for a bug fix?" >> $TMP
26         echo "CVS: b=" >> $TMP
27         echo "CVS: r=" >> $TMP
28
29         cat $1 >> $TMP
30         cp $TMP $1
31         rm $TMP
32 fi
33
34 if [ "${FILES:+have_files}"x = have_filesx ]; then
35   echo Diffing $1 : $FILES
36   cvs diff -wbBup $FILES 2>/dev/null | sed "s/^/CVS: /" >>$1
37 fi
38 #gnuclient $1 || vi $1
39 [ "$EDITOR" ] || EDITOR=vi
40
41 $EDITOR $1