[darcs-devel] darcs patch: added posthook command line switches (and 2 more)

Jason Dagit dagit at codersbase.com
Wed Aug 3 00:36:33 PDT 2005


This patch bundle supercedes the one I sent in a few days ago for adding a
postget hook (and it was created from a clean copy of the repo, so just
throw those other patches away).  I'm not sure where to document this new 
command line switch.  I guess in Apply.lhs is as good a place as any 
considering this makes a change to apply.  My hesitation is that posthooks 
are more general than apply so maybe it should be documented in one places?  
Perhaps it's better document it inidividually for each command that 
implements it?

David, I'd like to see this code added to unstable sooner instead of later,
so if there are no serious objections to this code, I'd love to see it get
added after 1.0.4pre2 is dealt with (Is 1.0.4pre2 going to become stable or 
1.0.4pre3?).  I will be using this version myself with others in my group.  
There are refinements that could be implemented, but for the most part I 
think it's ready.  And adding this gives us something to work with.

One thing that I found confusing when testing this is the difference between
specifying things on the command line vs. using defaults:
darcs apply --posthook-command="echo this is a test"
vs.
apply --posthook-command echo this is a test

I would have sort of expected the defaults version to be identical to the 
command line version minus darcs.  (Perhaps it should even allow that).  When
I had typed it exactly, it was ignored without a warning.  It wasn't until I
checked the example in the manual that I realized the syntax was different.

And, David, I would like to say thanks for all your help and encouragement
while I was trying to implement this feature.  Hopefully, we will be able
to add posthooks to the other major commands over the coming week.  Using
the framework you spelled out it should be very easy to add a posthook to
pull.  There is still the problem of fetching the remote settings needed for 
a posthook in get, not sure what do about that one.

Thanks,
Jason

Tue Aug  2 23:59:56 PDT 2005  Jason Dagit <dagit at codersbase.com>
  * added posthook command line switches
  Added generic posthook command line switches.  This patch does not add any
  posthooks to any command.

Wed Aug  3 00:01:56 PDT 2005  Jason Dagit <dagit at codersbase.com>
  * added run_posthook for actually running posthooks
  This adds the function run_posthook which should be used to run posthooks.
  The code was added to Test.lhs, but there may be a better place for this code.

Wed Aug  3 00:03:43 PDT 2005  Jason Dagit <dagit at codersbase.com>
  * posthook for apply
  With this patch it is now possible to specify a command to run after every
  successful apply.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 14798 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20050803/14a7a9b8/attachment.bin


More information about the darcs-devel mailing list