how to find patch dependencies using gerrit query

480 views
Skip to first unread message

Luis Gonzalez

unread,
Sep 21, 2011, 5:50:48 PM9/21/11
to Repo and Gerrit Discussion
Hi,

I'm using gerrit query to fetch patches information that are yet to be
merged. This the command I use:
gerrit query --current-patch-set project:<proj> branch:<ref> is:open

and it dumps a lot of information on my prompt but I cannot find
anything that tells me if a patch depends on other(s).

I know this information is available on Gerrit web interface but I
need to get this information automatically.

Any ideas?

Magnus Bäck

unread,
Sep 22, 2011, 2:41:08 AM9/22/11
to Repo and Gerrit Discussion
On Wednesday, September 21, 2011 at 23:50 CEST,
Luis Gonzalez <lgon...@ti.com> wrote:

I'm afraid the query command won't help you here. You'll have to download
the commit in question, the destination branch, and do a log operation.
Something like this:

git init
git fetch <base url> <refspec> refs/heads/<dest branch>:<dest branch>
git log <dest branch>..<patch sha-1>

I don't see a reason why the query command couldn't be extended to
include this information as well.

--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson

Nasser Grainawi

unread,
Sep 22, 2011, 10:37:55 AM9/22/11
to Magnus Bäck, Repo and Gerrit Discussion
On Sep 22, 2011, at 12:41 AM, Magnus Bäck wrote:

> On Wednesday, September 21, 2011 at 23:50 CEST,
> Luis Gonzalez <lgon...@ti.com> wrote:
>
>> I'm using gerrit query to fetch patches information that are yet to be
>> merged. This the command I use:
>> gerrit query --current-patch-set project:<proj> branch:<ref> is:open
>>
>> and it dumps a lot of information on my prompt but I cannot find
>> anything that tells me if a patch depends on other(s).
>>
>> I know this information is available on Gerrit web interface but I
>> need to get this information automatically.
>
> I'm afraid the query command won't help you here. You'll have to download
> the commit in question, the destination branch, and do a log operation.
> Something like this:
>
> git init
> git fetch <base url> <refspec> refs/heads/<dest branch>:<dest branch>
> git log <dest branch>..<patch sha-1>
>
> I don't see a reason why the query command couldn't be extended to
> include this information as well.

I think this request covers it: http://code.google.com/p/gerrit/issues/detail?id=1020

Nasser

>
> --
> Magnus Bäck Opinions are my own and do not necessarily
> SW Configuration Manager represent the ones of my employer, etc.
> Sony Ericsson
>

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

--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

Luis Gonzalez

unread,
Sep 22, 2011, 3:08:47 PM9/22/11
to Repo and Gerrit Discussion

On Sep 22, 1:41 am, Magnus Bäck <magnus.b...@sonyericsson.com> wrote:
> On Wednesday, September 21, 2011 at 23:50 CEST,
>      Luis Gonzalez <lgonza...@ti.com> wrote:
>
> > I'm using gerrit query to fetch patches information that are yet to be
> > merged. This the command I use:
> > gerrit query --current-patch-set project:<proj> branch:<ref> is:open
>
> > and it dumps a lot of information on my prompt but I cannot find
> > anything that tells me if a patch depends on other(s).
>
> > I know this information is available on Gerrit web interface but I
> > need to get this information automatically.
>
> I'm afraid the query command won't help you here. You'll have to download
> the commit in question, the destination branch, and do a log operation.
> Something like this:
>
>    git init
>    git fetch <base url> <refspec> refs/heads/<dest branch>:<dest branch>
>    git log <dest branch>..<patch sha-1>

Thanks Marcus! this suffice my requirements.
Reply all
Reply to author
Forward
0 new messages