source: trunk/locker/sbin/commit-zephyr @ 1384

Last change on this file since 1384 was 748, checked in by andersk, 16 years ago
Allow sending commits to instance rNNN or string.rNNN.
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 874 bytes
Line 
1#!/bin/sh
2
3CLASS=scripts
4INSTANCE=@
5FULL=0
6
7OPTS=$(getopt -o c:i:f -l class:,instance:,full -n "$0" -- "$@") || exit $?
8eval set -- "$OPTS"
9while :; do
10    case "$1" in
11        -c|--class) CLASS=$2; shift 2;;
12        -i|--instance) INSTANCE=$2; shift 2;;
13        -f|--full) FULL=1; shift;;
14        --) shift; break;;
15        *) exit 1;;
16    esac
17done
18[ $# -ge 2 ] || exit 1
19REPOS=$1
20REV=$2
21
22if [ "$INSTANCE" = "${INSTANCE%@}@" ]; then
23    INSTANCE=${INSTANCE%@}r$REV
24fi
25
26dirs=$(svnlook dirs-changed "$REPOS" -r "$REV")
27svnlook info "$REPOS" -r "$REV" | (
28    read -r author
29    read -r datestamp
30    read -r logsize
31    log=$(cat)
32    echo "r$REV by $author $datestamp"
33    echo "$log"
34    svnlook changed "$REPOS" -r "$REV"
35    if [ "$FULL" -eq 1 ]; then
36        echo
37        svnlook diff "$REPOS" -r "$REV"
38    else
39        echo svnlook diff "$REPOS" -r "$REV"
40    fi
41) | zwrite -d -c "$CLASS" -i "$INSTANCE" -s "r$REV - $dirs"
Note: See TracBrowser for help on using the repository browser.