Patchwork [3/3] docs: Add a pointer to the git post-receive hook

login
register
mail settings
Submitter Carl Worth
Date Dec. 11, 2013, 6:46 p.m.
Message ID <1386787588-2074-3-git-send-email-cworth@cworth.org>
Download mbox | patch
Permalink /patch/300285/
State Accepted
Headers show

Comments

Carl Worth - Dec. 11, 2013, 6:46 p.m.
I had to stumble upon this feature before I realized it was here
inside the tools directory all along. This documentation should make
it easier for the next person coming along looking for a patchwork git
hook.
---
 docs/INSTALL | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
Peter Korsgaard - Dec. 11, 2013, 8:25 p.m.
>>>>> "Carl" == Carl Worth <cworth@cworth.org> writes:

 > I had to stumble upon this feature before I realized it was here
 > inside the tools directory all along. This documentation should make
 > it easier for the next person coming along looking for a patchwork git
 > hook.
 > ---
 >  docs/INSTALL | 17 +++++++++++++++++
 >  1 file changed, 17 insertions(+)

 > diff --git a/docs/INSTALL b/docs/INSTALL
 > index 91c6081..06c21d4 100644
 > --- a/docs/INSTALL
 > +++ b/docs/INSTALL
 > @@ -217,6 +217,23 @@ fastcgi:
 
 >       sudo -u nobody /srv/patchwork/apps/patchwork/bin/parsemail.sh < mail
 
 > +7. Optional: Configure your VCS to automatically update patches
 > +
 > +    The tools directory of the patchwork distribution contains a file
 > +    named post-receive.hook which is an example git hook that can be
 > +    used to automatically update patches to the Accepted state when
 > +    corresponding comits are pushed via git.
 > +
 > +    To install this hook, simply copy it to the .git/hooks directoy on

s/sirectoy/directory/
Yann E. MORIN - Dec. 11, 2013, 9:28 p.m.
Peter, All,

On 2013-12-11 21:25 +0100, Peter Korsgaard spake thusly:
> >>>>> "Carl" == Carl Worth <cworth@cworth.org> writes:
> 
>  > I had to stumble upon this feature before I realized it was here
>  > inside the tools directory all along. This documentation should make
>  > it easier for the next person coming along looking for a patchwork git
>  > hook.
>  > ---
>  >  docs/INSTALL | 17 +++++++++++++++++
>  >  1 file changed, 17 insertions(+)
> 
>  > diff --git a/docs/INSTALL b/docs/INSTALL
>  > index 91c6081..06c21d4 100644
>  > --- a/docs/INSTALL
>  > +++ b/docs/INSTALL
>  > @@ -217,6 +217,23 @@ fastcgi:
>  
>  >       sudo -u nobody /srv/patchwork/apps/patchwork/bin/parsemail.sh < mail
>  
>  > +7. Optional: Configure your VCS to automatically update patches
>  > +
>  > +    The tools directory of the patchwork distribution contains a file
>  > +    named post-receive.hook which is an example git hook that can be
>  > +    used to automatically update patches to the Accepted state when
>  > +    corresponding comits are pushed via git.
>  > +
>  > +    To install this hook, simply copy it to the .git/hooks directoy on
                                                                 ^^^^^^^^
> s/sirectoy/directory/

s/sirectoy/directoy/

Just because I looked at it for a moment before I could see there was a
typo in the sed expression. ;-)

Regards,
Yann E. MORIN.
Peter Korsgaard - Dec. 11, 2013, 9:36 p.m.
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 >> > +    To install this hook, simply copy it to the .git/hooks directoy on
 >                                                                  ^^^^^^^^
 >> s/sirectoy/directory/

 > s/sirectoy/directoy/

 > Just because I looked at it for a moment before I could see there was a
 > typo in the sed expression. ;-)

Heh, sorry about that ;)

Patch

diff --git a/docs/INSTALL b/docs/INSTALL
index 91c6081..06c21d4 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -217,6 +217,23 @@  fastcgi:
 
      sudo -u nobody /srv/patchwork/apps/patchwork/bin/parsemail.sh < mail
 
+7. Optional: Configure your VCS to automatically update patches
+
+    The tools directory of the patchwork distribution contains a file
+    named post-receive.hook which is an example git hook that can be
+    used to automatically update patches to the Accepted state when
+    corresponding comits are pushed via git.
+
+    To install this hook, simply copy it to the .git/hooks directoy on
+    your server, name it post-receive, and make it executable.
+
+    This sample hook has support to update patches to different states
+    depending on which branch is being pushed to. See the STATE_MAP
+    setting in that file.
+
+    If you are using a system other than git, you can likely write a
+    similar hook using pwclient to update patch state. If you do write
+    one, please contribute it.
 
 Some errors: