bksend 988 B

123456789101112131415161718192021222324252627282930313233343536
  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
  4. #
  5. # Add diffstat output after Changelog <adilger@turbolabs.com> 21/02/2002
  6. PROG=bksend
  7. usage() {
  8. echo "usage: $PROG -r<rev>"
  9. echo -e "\twhere <rev> is of the form '1.23', '1.23..', '1.23..1.27',"
  10. echo -e "\tor '+' to indicate the most recent revision"
  11. exit 1
  12. }
  13. case $1 in
  14. -r) REV=$2; shift ;;
  15. -r*) REV=`echo $1 | sed 's/^-r//'` ;;
  16. *) echo "$PROG: no revision given, you probably don't want that";;
  17. esac
  18. [ -z "$REV" ] && usage
  19. echo "You can import this changeset into BK by piping this whole message to:"
  20. echo "'| bk receive [path to repository]' or apply the patch as usual."
  21. SEP="\n===================================================================\n\n"
  22. echo -e $SEP
  23. env PAGER=/bin/cat bk changes -r$REV
  24. echo
  25. bk export -tpatch -du -h -r$REV | diffstat
  26. echo; echo
  27. bk export -tpatch -du -h -r$REV
  28. echo -e $SEP
  29. bk send -wgzip_uu -r$REV -