[darcs-users] determining what darcs apply did [was: sending notices when a repo changes]

Ralph Corderoy ralph at inputplus.co.uk
Sun Mar 6 10:19:02 UTC 2005


Hi David,

> On Sat, Mar 05, 2005 at 08:02:45AM -0500, David Roundy wrote:
> > Ideally I'd like to be able to write something like
> > 
> > echo "$PATCH_SUMMARIES" | mail -s "$NUM_PATCHES applied to $REPO" droundy
> > 
> > I'm not sure how the $PATCH_SUMMARIES bit would work, though, since
> > it'd have embedded newlines.  :(
> 
> Actually, it just occurred to me that we could export a $MATCH_PATCHES
> commandline flag that containts "--matches 'hash $HASH1 || hash $HASH2
> ... ' and then I could write
> 
> darcs changes -s $MATCH_PATCHES | mail -s "$NUM_PATCHES applied to $REPO" droundy

Please plan ahead for an environment variable getting too large, or the
environment getting too full, or the number of arguments getting too
large.

I'd favour possibly large data going into a temporary file with the
filename in an environment variable.

    mail -s "$NUM_PATCHES applied to $REPO" droundy <$PATCH_SUMMARIES

How do other SCMs handle this?

Cheers,


Ralph.





More information about the darcs-users mailing list