Linux-2.6.12-rc2
[linux-2.6/kvm.git] / Documentation / BK-usage / bksend
blob836ca943694f49fc65efdafa7067c63e0136271e
1 #!/bin/sh
2 # A script to format BK changeset output in a manner that is easy to read.
3 # Andreas Dilger <adilger@turbolabs.com> 13/02/2002
5 # Add diffstat output after Changelog <adilger@turbolabs.com> 21/02/2002
7 PROG=bksend
9 usage() {
10 echo "usage: $PROG -r<rev>"
11 echo -e "\twhere <rev> is of the form '1.23', '1.23..', '1.23..1.27',"
12 echo -e "\tor '+' to indicate the most recent revision"
14 exit 1
17 case $1 in
18 -r) REV=$2; shift ;;
19 -r*) REV=`echo $1 | sed 's/^-r//'` ;;
20 *) echo "$PROG: no revision given, you probably don't want that";;
21 esac
23 [ -z "$REV" ] && usage
25 echo "You can import this changeset into BK by piping this whole message to:"
26 echo "'| bk receive [path to repository]' or apply the patch as usual."
28 SEP="\n===================================================================\n\n"
29 echo -e $SEP
30 env PAGER=/bin/cat bk changes -r$REV
31 echo
32 bk export -tpatch -du -h -r$REV | diffstat
33 echo; echo
34 bk export -tpatch -du -h -r$REV
35 echo -e $SEP
36 bk send -wgzip_uu -r$REV -