diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-07-05 13:22:47 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-07-05 13:22:47 +0200 |
commit | 2fab1a73b11a500c38e9df67d1b2061e9a6c9232 (patch) | |
tree | e0041184a3b147c34272f2ebf99061ceb6c66e22 /logerrit | |
parent | f3b1a1581324085257f3eb8290a086b22dcca8f5 (diff) |
logerrit: for review, we need to grep for revision, not ref
Change-Id: I0fb8b1e4f14e153adae7a2ec1b3adbb0dab5c847
Diffstat (limited to 'logerrit')
-rwxr-xr-x | logerrit | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |