Re: scripts interaction of Patchwork and Git

2010年1月24日 13:55:11 -0800

Paul,
> 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:
 #!/bin/bash
 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:
 #!/bin/bash
 git rev-list "$@" |
 while read commit
 do
 hash=$(git show $commit | pwparser --hash)
 pwclient update -h $hash -s Accepted -c $commit
 done
Note that pwparser is a symbolic link from ~/bin/pwparser to 
$patchwork/apps/bin/patchwork/parser.py. I need to work out a nicer way to 
distribute the parser code. Once that is done, I'll these to the online help.
Cheers,
Jeremy
_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to