Gerrit review patch query helper...

classic Classic list List threaded Threaded
5 messages Options
spaetz spaetz
Reply | Threaded
Open this post in threaded view
|

Gerrit review patch query helper...

Hi all, I was annoyed by the oververbose gerrit query output so I fixed
it for me.

I learned too late that David has something similar as logerrit
in the core repository. But it is in shell script, and I have written a
small query helper in python. It lists outstanding patches similar to
"git log" (it also uses less to show them). The output is like this:

id    : I078ad7bcd2b5dff39969deb44fd8a11076ce27c2 https://gerrit.libreoffice.org/233
Author: David Ostrovsky <[hidden email]>
Date  : Fri Jun 22 07:19:12 2012, updated: Fri Jun 22 11:49:34 2012
Subject: polishing user interface

The code is at git://gitorious.org/querrit/querrit.git and requires
Python3. Check it out and do ./querrit -h for help. By default it tries
to connect to host logerrit (but you can override the host with a
parameter).

To test your connection do "querrit test", to do the standard query (all
open patches) simply do "querrit". To only see open patches that you
have starred, add "--qopts is:starred".

Feedback is welcome. I plan to add some config file support to be able
to configure the hostname. If I have plenty of time, I'll also add a
userfriendly "review" tool.

Just to let you know.
Sebastian
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Michael Meeks-2 Michael Meeks-2
Reply | Threaded
Open this post in threaded view
|

Re: Gerrit review patch query helper...

Hi Sebastian,

On Fri, 2012-06-22 at 16:03 +0200, Sebastian Spaeth wrote:
> Hi all, I was annoyed by the oververbose gerrit query output so I fixed
> it for me.

        Me too :-)

> I learned too late that David has something similar as logerrit
> in the core repository. But it is in shell script, and I have written a
> small query helper in python. It lists outstanding patches similar to
> "git log" (it also uses less to show them). The output is like this:

        Could we not convert David's logerrit into python ? and have a single
script in more of a real programming language :-) [ shell eventually
becomes an un-maintainable / non-portable tangle IMHO ].

        David - would you be ok with that ?

> The code is at git://gitorious.org/querrit/querrit.git and requires
> Python3.

        Oh - but of course requiring the very latest python is not so cool for
general use I guess :-)

> Feedback is welcome. I plan to add some config file support to be able
> to configure the hostname. If I have plenty of time, I'll also add a
> userfriendly "review" tool.

        Sounds great to me, but I'd -love- us all using, documenting, and
improving the same tooling (preferably not written in shell) ;-)

        Thanks for jumping on and fixing the problem :-)

        All the best !

                Michael.

--
[hidden email]  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
spaetz spaetz
Reply | Threaded
Open this post in threaded view
|

Re: Gerrit review patch query helper...

Hi, sorry for shameless self-plugs but I think this tool has become really
useful now:

querrit can perform easy queries and code review. It provides shortcuts
and convenience features. For example:

gerrit query mine

lists all open review requests that were submitted by me. (achieved by putting
[shortcuts] mine = status:open project:core [hidden email] into
~/.config/querrit.conf)

gerrit query writer

You can easily do similar things for easy monitoring requests for specific
git branches, where you have been CC'd etc...

A typical review looks like:

gerrit review 2a34e2 +2 -m "looks good to me"

See the README for the full documentation
https://gitorious.org/querrit/querrit/blobs/master/README

The code is at git://gitorious.org/querrit/querrit.git and requires
Python3 or Python 2.7.

Sebastian

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

attachment0 (203 bytes) Download Attachment
spaetz spaetz
Reply | Threaded
Open this post in threaded view
|

Re: Gerrit review patch query helper...

Sebastian Spaeth <[hidden email]> writes:

> querrit can perform easy queries and code review. It provides shortcuts
> and convenience features. For example:

got my examples wrong. Obviously

gerrit query mine --> querrit query mine

While at it, one last example that is nice (all open patches mentioning
fdo#35673 in the commit message):

gerrit query MAB3.4

[shortcuts]
MAB3.4 = status:open project:core message:fdo.35673
new_unrev = status:open age:1d not is:reviewed

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

attachment0 (203 bytes) Download Attachment
Bjoern Michaelsen Bjoern Michaelsen
Reply | Threaded
Open this post in threaded view
|

Re: Gerrit review patch query helper...

In reply to this post by spaetz
Hi,

On Tue, Jun 26, 2012 at 01:35:14PM +0200, Sebastian Spaeth wrote:
> Hi, sorry for shameless self-plugs but I think this tool has become really
> useful now:

I love all these tooling efforts, but I really think we should coordinate them
more as changing the developer docs too often will just create frustrations on
its own. So the timeline in my head looks something like this:
- before switch: let devs learn their way around gerrit itself and only do
  minor tweaks to the workflows, additional scripting can evolve "outside" the
  core repo
- end of July: switch to gerrit as main repo
- end of August: hope every dev has a somewhat qualified opinion on the
  available tooling/scripting sets and maybe switch to one of the gerrit
  wrappers by default (updating the docs along the way and puuting it in core)

So, I hope you and David are not too disappointed, if I hope for the scripts to
foster "outside" the core-repo (at least those requiring updating the docs) for
some time. Is that ok with you?

What we urgently need "inside" the current solution is inegration of
mailinglists and IRC.

Best,

Bjoern
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice