[Mesa-dev] Nesa-dev now integrated with patchwork

Carl Worth cworth at cworth.org
Wed Nov 27 15:07:17 PST 2013

For those of you who don't know, freedesktop.org runs an instance of
Patchwork to aid in tracking patches that are in need of review. We've
just finished getting it integrated with the Mesa-dev list. Here's a
brief run-down of what Patchwork provides for us.

Automatic flow of patches in Patchwork
Each patch sent to mesa-dev@ is automatically entered into Patchwork's
database in the "New" state. You can browse the patches in Patchwork's
database here:


Replies to the patch are also collected and made visible in the web

When a branch is pushed to the master git repo, a git hook will
automatically search for the patch in the database, and if it is found,
put it in the "Accepted" state. When this happens, you'll see something
like the following in the console output of the "git push" command:

	remote: I: patch #<PATCHWORK_ID> updated using rev <GIT_COMMIT>.

If, instead, git push gives you output such as:

	remote: E: failed to find patch for rev <GIT_COMMIT>.
this means that you pushed a patch to master that wasn't found in
Patchwork's database. This can happen if you neglected to email the
patch to the mailing list prior to pushing the commit, or if you made a
change to the patch between mailing it and pushing it. If the latter,
then you'll likely want to manually update patchwork (see below).

Manual updates to Patchwork patch state
You can also change the state of patchwork patches through the web
interface or through a command-line client. First, you'll need to create
a patchwork login at:


Once you have created an account, you'll now see buttons such as "Change
state" and "Delegate to" for patches that you have submitted. If you
want to help maintain the state of other patches in patchwork, please
let me know and I can add you to patchwork's "maintainers" list for

For now, the most common manual change might be to change a patch from
the "New" to the "Accepted" state when this didn't happen automatically
at the time of "git push". There are other states in the Patchwork
database by default, ("Under review", "Rejected", "Superseded",
etc.). And we can easily add or remove any items we want from this list.

It will probably take some experimenting within our community to find
what states and workflows we find useful.

Command-line access to Patchwork with pwclient
In addition to the web interface, Patchwork also includes a handy
command-line script for interaction. You can download the pwclient
python script from:


Before this utility is useful, you'll also need a .pwclientrc file in
your home directory. If you're currently logged into patchwork, the
following URL provides a pre-configured .pwclientrc file for you with
your username/password in it:


I've also attached an example file you can fill out.

The pwclient script allows you to view and update patches just like the
web interface:

	pwclient list -s new	# List all patches in "New" state

	pwclient update -s Accepted <PWID> # Update a specific patch

In addition, you can download or download-and-apply a patch with
commands such as:

	pwclient get <PWID>

	pwclient git-am <PWID>

So give things a try, and let's see if this is a useful additional tool
for us, (not replacing either of the mailing list nor bugzilla, but
hopefully providing some new, useful views).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pwclientrc
Type: application/octet-stream
Size: 401 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131127/d8a24dbc/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131127/d8a24dbc/attachment.pgp>

More information about the mesa-dev mailing list