[darcs-users] patch review script

Eric Kow kowey at darcs.net
Tue Sep 9 12:01:37 UTC 2008


Just a quick sed script for anybody who likes to do patch review over
email.  This automatically breaks a patch bundle into sections, with one
section per patch.  It also cuts away the context of a bundle.

   one patch
   ---------
   > the contents here
   > more contents
   
   your review
   
   a second patch
   --------------
   > more contents
   
   more review

You use it by telling your text editor to pipe the contents of the
current file (i.e. your email reply) to this sed script.  In vim,
this looks like:

  map ,dr        :%!sed -f ~/custom/darcs-review.sed

So when I want to review a patch bundle, I just hit « ,dr »
(darcs review) and have things nicely formatted enough.

I guess this applies to any project that works be reviewing incoming
darcs patch bundles on a maling list.

There could be more automation involved, for example, automatically
adding whatever tags we would need to talk to a patch tracker. I
hope somebody finds this useful anyway

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
# kill stuff between the patch context and my mail signature
/^> Context:/,/^-- /c\
\
-- 

# add a section break for each patch
/^> \[/ {
i\
\

s/^> \[//
h
s/./-/g
H
g
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080909/054e3dc5/attachment.pgp 


More information about the darcs-users mailing list