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

Phil Frost indigo at bitglue.com
Thu Mar 3 16:46:20 UTC 2005

On Thu, Mar 03, 2005 at 08:55:32AM -0500, David Roundy wrote:
> On Thu, Mar 03, 2005 at 12:04:48PM +0000, Pedro Melo wrote:
> > On 3/mar/2005, at 04:37, Phil Frost wrote:
> > 
> > >I would like to write one, but I am not sure how to best do it. The
> > >first problem is I know of no way to run a command when the repo
> > >has changed. Because I always modify my repo with 'darcs send' to a
> > >pipe delivery, I could run the program there, but this is not a
> > >good solution for people that have not configured darcs like this.
> > 
> > What you want is hooks. It would be great.
> > 
> > I don't know if they are planned or not.
> They are indeed planned.  It just requires someone taking the time to
> actually implement them.  They won't even be hard, it just requires adding
> a --post-hook flag to all darcs commands, and then you'd set it in your
> defaults.
> There's even a wishlist bug on the subject...

It is good to know a better solution is planned. I imagine I can
implement a less clean solution until then.

However, the second half of the problem is still unanswered, how do I
know what has changed? Because I always commit by sending mail to a
magic user, I will run my notification program then. However, I need
some way to get some description of the new patches, and what files they
have changed.

The best idea that comes to mind is to run 'darcs changes -s' and
compare the output of that to the output from the last commit. This is
really, really ugly though. Is there a better way?

More information about the darcs-users mailing list