Posting a multi-line review comment to Gerrit Code Review from a shell script

Because it isn’t obvious and it always takes me a while to figure it out again every time.


#!/bin/sh
USER="username"
SERVER="review"
REVISION="12345,1"
MESSAGE="This is a message

with multiple

lines"

ssh -p 29418 $USER@$SERVER gerrit review \'--message="$MESSAGE"\' $REVISION

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s