[Pixman] Announcement: Patchwork for Pixman

Pekka Paalanen ppaalanen at gmail.com
Tue Jul 14 23:13:20 PDT 2015

On Tue, 14 Jul 2015 15:48:54 +0200
Thomas Petazzoni <thomas.petazzoni at free-electrons.com> wrote:

> Hello,
> On Tue, 14 Jul 2015 15:34:30 +0300, Pekka Paalanen wrote:
> > There is one more bit of automation: when a commit gets pushed into the
> > upstream git repository, a git hook will run that searches for the
> > patch in Patchwork. If it finds a match (the patch content must match
> > exactly, commit message does not matter), it marks the one patch as
> > "accepted". The person pushing to git will see messages from this git
> > hook, and will know if Patchwork was updated.
> > 
> > There is one catch with the git hook, though. If an identical patch has
> > been submitted multiple times, it will mark only the oldest as
> > accepted, leaving the rest. As I've heard Intel may be pushing
> > Patchwork forward, perhaps this will get fixed eventually.
> This can actually already be solved, in two ways:


thanks for the suggestions, I wasn't aware of these, and I totally
forgot to mention the existence of pwclient, the command line tool to
interface with Patchwork!

>  1/ You can calculate a patchwork hash of a commit by doing "git show
>     <foo> | pwparser --hash" and then mark it as accepted using
>     pwclient update -h <hash> -s Accepted -c <commitid>

How is this different to what the git hook does? Does it mark all the
copies in Patchwork? Or the newest? The exact match including commit

For the record, the main points of the current git hook are:

	hash=$(git show $rev | python $PWDIR/parser.py --hash)

	id=$($PWDIR/bin/pwclient view -p $PROJECT -h $hash 2>/dev/null \
	    | sed -rne 's,X-Patchwork-Id: ,,p')

	$PWDIR/bin/pwclient update -s Accepted -c $rev $id 2>&1

Btw. where does your snippet choose the project?

>  2/ Or when you apply a patch from patchwork, use a script that will
>     add a git note containing the patchwork id of the patch, and then
>     when you push, you use a script that reads that git notes and marks
>     that patch as accepted in patchwork. Of course this is done on the
>     maintainer machine side, not on the Git "server" side.

Right, that's an option, if people are ok with storing patchwork
references in upstream git. We'll have to see how Patchwork is received


More information about the Pixman mailing list