How to format comments (and/or programatically add in-line review comments?)

4,853 views
Skip to first unread message

Anthony Wong

unread,
Jun 28, 2012, 3:00:25 PM6/28/12
to repo-d...@googlegroups.com
Hi--
 
I am interested in either putting checkpatch results in the comment field or else placing each checkpatch error/warning in-line.
 
Are either of these possible?
 
I tried using typical html tags in the comment, but no results (<p>, </br>)
 
For making comments in-line, do I need to use the SQL?  Any advice?
 
--Thanks,
Anthony

Anthony Wong

unread,
Jun 28, 2012, 3:58:50 PM6/28/12
to repo-d...@googlegroups.com
I found this information about formatting comments:
 

Magnus Bäck

unread,
Jun 28, 2012, 4:35:35 PM6/28/12
to repo-d...@googlegroups.com
On Thursday, June 28, 2012 at 15:00 EDT,
Anthony Wong <won...@gmail.com> wrote:

> I am interested in either putting checkpatch results in the comment
> field or else placing each checkpatch error/warning in-line.
>
> Are either of these possible?
>
> I tried using typical html tags in the comment, but no results (<p>,
> </br>)

Start a line with an asterisk and get a bullet list, or start it with
a space and you get preformatted text (code). This is valid both in
inline comments and in patch set comments. Oh, apart from blank lines
will start new paragraphs.

If this isn't documented is certainly should be.

> For making comments in-line, do I need to use the SQL? Any advice?

You could insert the comments directly into the database, although that
would mean no emails are sent (which might be a good thing, depending on
who you ask). Also, it's of course a fragile interface. Another way
would be to use Gerrit's own JSON-RPC interface.

There is a change to add addition of inline comments to the "review" SSH
command. It's a shame that it's stalled since May 2011.

https://gerrit-review.googlesource.com/22800

--
Magnus Bäck
ba...@google.com

Doreen Lavenda Goldberg

unread,
May 17, 2021, 2:37:43 AM5/17/21
to Repo and Gerrit Discussion
I'm trying to get a multi line message in the gerrit review and what is written above is not working for me, can you please give an example how to get the special characters to work ?
I tried something like this - 

ssh -p 29418 review.example.com gerrit review --m '" * '''Line1:hello''' * '''Line2:hello'''"'  8242,2

Only the first "*" worked and became a bullet in the gerrit. 
In general where can i find information about which characters to use for bullets, spacing etc.. 

Thanks,

Doreen 
Reply all
Reply to author
Forward
0 new messages