Whamcloud - gitweb
- should init kptllnd_data.kptl_idle_txs before calling kptllnd_shutdown.
[fs/lustre-release.git] / build / 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 # i=<inspected_by>
10 # i=<inspected_by>
11 #
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.
14
15 [ -f .mergeinfo ] && . ./.mergeinfo
16
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
20 fi
21 FILES=$($CVS_MODIFIED_FILES_PL $1)
22 TMP=`mktemp /tmp/cvslog-XXXXXXXX`
23 if [ -f $TMP ]; then
24         [ -f .mergeinfo ] && . .mergeinfo
25         [ -z "$PARENT" -a -f lustre/.mergeinfo ] && . lustre/.mergeinfo
26         if [ "$PARENT" ]; then
27                 [ "$OPERATION" ] || OPERATION=Update
28                 [ "$OPERWHERE" ] || OPERWHERE=from
29                 echo "CVS: $OPERATION $child $OPERWHERE $parent ($date)" >> $TMP
30         else
31                 [ -r CVS/Tag ] && TAG=CVS/Tag
32                 [ -z "$TAG" -a -r lustre/CVS/Tag ] && TAG=lustre/CVS/Tag
33                 [ "$TAG" ] && BRANCH="`sed 's/^T//' $TAG`" || BRANCH="HEAD"
34                 echo "CVS: Branch $BRANCH" >> $TMP
35         fi
36 cat - >> $TMP <<- EOF
37         CVS: Remove "CVS:" from start of lines that should be in commit message
38         CVS: did you update the ChangeLog for a bug fix?
39         CVS: did you update the hours spent in Bugzilla?
40         CVS: did you verify/update the HLD/DLD in CVS?
41         CVS: b=<bug>
42         CVS: i=<inspected_by>
43         CVS: i=<inspected_by>
44 EOF
45
46         cat $1 >> $TMP
47         cp $TMP $1
48         rm $TMP
49 fi
50
51 if [ "${FILES:+have_files}"x = have_filesx ]; then
52   echo Diffing $1 : $FILES
53   cvs diff -wbBup $FILES 2>/dev/null | sed "s/^/CVS: /" >>$1
54 fi
55 #gnuclient $1 || vi $1
56 [ "$EDITOR" ] || EDITOR=vi
57
58 $EDITOR $1