Using the OR operator with a gerrit query

1,370 views
Skip to first unread message

Durgadoss Ramanathan

unread,
Dec 15, 2015, 6:52:32 AM12/15/15
to repo-d...@googlegroups.com
Hi,

I am trying to query the list of 'open OR merged' patches for a particular user.

Looks like I have to specify the "owner:self" every time before the "status:<value>".
Am I missing something or is this the right way to go ?

ssh -p 29418 review.example.com gerrit query --format=text owner:self status:open OR status:merged project:tools limit:10
does not give what I want whereas the below query does it:
ssh -p 29418 review.example.com gerrit query --format=text owner:self status:open OR owner:self status:merged project:tools limit:10

-- 
Regards
Durgadoss

Alex Blewitt

unread,
Dec 15, 2015, 9:25:07 AM12/15/15
to Durgadoss Ramanathan, Repo and Gerrit Discussion
You should put the parts you want in brackets

owner:self project:tools limit:10 (status:open OR status:merged)

Your original search is being parsed as:

(owner:self status:open) OR (status:merged project:tools limit:10)

Alex

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Durgadoss Ramanathan

unread,
Dec 16, 2015, 8:45:16 AM12/16/15
to Alex Blewitt, Repo and Gerrit Discussion
Thanks Alex. That works for me.
--
Regards
Durgadoss
Reply all
Reply to author
Forward
0 new messages