logerrit: for review, we need to grep for revision, not ref

Change-Id: I0fb8b1e4f14e153adae7a2ec1b3adbb0dab5c847
This commit is contained in:
Miklos Vajna
2012-07-05 13:22:47 +02:00
parent f3b1a15813
commit 2fab1a73b1

View File

@@ -8,6 +8,10 @@ get_SHA_for_change() {
SHA=`ssh ${GERRITHOST?} gerrit query --all-approvals change:$1|grep ref|tail -1|cut -d: -f2`
}
get_REVISION_for_change() {
REVISION=`ssh ${GERRITHOST?} gerrit query --all-approvals change:$1|grep revision|tail -1|cut -d: -f2`
}
ask_tristate() {
case $1 in
[yY] | [yY][Ee][Ss] | [+] )
@@ -159,8 +163,8 @@ case "$1" in
;;
esac
read -p "please type a friendly comment$MESSAGEREQ: " MESSAGE
get_SHA_for_change $CHANGEID
ssh ${GERRITHOST?} gerrit review -m \"$MESSAGE\" $VERIFIEDFLAG $CODEREVIEWFLAG $SHA
get_REVISION_for_change $CHANGEID
ssh ${GERRITHOST?} gerrit review -m \"$MESSAGE\" $VERIFIEDFLAG $CODEREVIEWFLAG $REVISION
;;
checkout)
get_SHA_for_change $2