scripts interaction of Patchwork and Git

Jeremy Kerr jk at
Mon Jan 25 08:55:03 EST 2010


> Before I send other question in a separate threads I was wondering if
> you could share your scripts you all wrote to make your life easier as
> for example Git hooks.

OK, in the interests of writing stuff down, this is what I have:

* A hook in .git/hooks/post-applypatch:


 sha=$(git rev-parse HEAD)
 hash=$(git show $sha | pwparser --hash)
 pwclient update -s Accepted -c $sha -h $hash

* A 'catchup' script, to mark a range of revs as accepted:


 git rev-list "$@" |
 while read commit
     hash=$(git show $commit | pwparser --hash)
     pwclient update -h $hash -s Accepted -c $commit

Note that pwparser is a symbolic link from ~/bin/pwparser to 
$patchwork/apps/bin/patchwork/ I need to work out a nicer way to 
distribute the parser code. Once that is done, I'll these to the online help.



More information about the Patchwork mailing list