[MERGE] Add documentation for hooks
Robert Collins
robertc at robertcollins.net
Wed Aug 29 22:29:07 BST 2007
On Wed, 2007-08-29 at 16:07 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> This patch adds some documentation on hooks. I needed to find out more
> about hooks, and I couldn't find any documentation, so I wrote some.
bb:tweak
I think this is currently likely to get folk wanting to install plugins
to think they need to write hooks, just some minor tweaks to the index
and the introduction will help. e.g. 'Hooks can be used by plugins to
customise bzr with custom python code called during operations.'
+The following hooks are currently available:
+
+:post_push: Run after ``push`` has completed
I think these should be fully qualified here. (Ideally there would be a
bzr help command to spit these out rather than static docs, but thats a
separate issue). e.g.
:Branch.post_push: Run after ``push`` has completed.
+First, we define a function that will be run after ``push`` completes.
We
+could also use an intance method or a callable object. All push hooks
take a
+single argument, the ``pull_result``.
push hooks take a ``push result`` :).
Cheers,
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070830/2c115167/attachment.pgp
More information about the bazaar
mailing list