review board scipt
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@19629 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
3b6a41055f
commit
e04350140e
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z $1 ] || [ "$1" == "-h" ] || [ "$1" == "--help" ] || [ "$1" == "-help" ] || [ "$1" == "-?" ]; then
|
||||
echo "Usage: `basename $0` [rev] [args]\n"
|
||||
echo " [rev] : either the revision number without leading 'r' (post-commit),"
|
||||
echo " or '-loc' to create a review from current local changes (pre-commit)\n"
|
||||
echo " [args] : optional arguments:"
|
||||
echo " -r ID existing review request ID to update\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
POSTREVIEW=`dirname $0`/postreview.py
|
||||
|
||||
if [ "$1" == "-loc" ]; then
|
||||
echo "creating review request from local changes..."
|
||||
REVARG=""
|
||||
LOG=""
|
||||
SUMMARY="local changes"
|
||||
else
|
||||
REV=$1
|
||||
PREV=`expr $REV - 1`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "argument revision not a number: $REV"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "creating review request for changeset $REV..."
|
||||
|
||||
LOG="`svn log -c $REV`"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "could not get svn log for revision $REV"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REVARG="--revision-range=$PREV:$REV"
|
||||
SUMMARY="r$REV"
|
||||
fi
|
||||
|
||||
|
||||
shift # remove parameter $1 (revision)
|
||||
|
||||
python $POSTREVIEW --server="https://chara2.epfl.ch" $REVARG --summary="$SUMMARY" --description="$LOG" -o $@
|
||||
Loading…
Reference in New Issue