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

Jason Dagit dagit at codersbase.com
Wed Aug 24 22:18:23 PDT 2005


This implements the posthook option for all darcs commands and adds
documentation as well.  It does not add any test cases, I need help with
that part.

Here are examples of things we need to test:
1) Commands that don't run in the current working directory have the right
   path.
   Ex: remote repo has the lines "apply posthook echo `pwd`" and 
       "apply run-posthook" defined in _darcs/prefs/defaults.  Doing a 
       push to this repo should give should show the remote path.
2) Make sure that the posthook command is only run once in all possible
   combinations of the command failing/passing.
3) Check to see if a posthook simply behaves backwards for any commands. 
   This could be the case if trying to record when there are no patches to
   record.  What should happen in this case?
4) Test this on windows.
5) Anything anyone else can think of.

I'd implement some of these tests, but my perl skills are not up to the
challenge.  Perhaps if someone created some examples I could add a test or
two...

I'm looking forward to this getting accepted and hopefully before 1.0.4 comes
out, but who knows, maybe it needs more testing.  But, I do know a lot of
people will like having this hook.  One of the cool things it can do is
run a script to fix up permissions when people do a push.  I found this was
important when others in my group would push to my repo from their accounts 
because they might have some weird umask.

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.

Wed Aug 24 21:33:05 PDT 2005  Jason Dagit <dagit at codersbase.com>
  * now the posthook options appear for each command

Wed Aug 24 21:34:14 PDT 2005  Jason Dagit <dagit at codersbase.com>
  * changed from --posthook-command to posthook

Wed Aug 24 21:57:06 PDT 2005  Jason Dagit <dagit at codersbase.com>
  * posthook documentation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 26824 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20050824/6af68105/attachment.bin


More information about the darcs-devel mailing list