Hooks

Sam Bull bazaar at sambull.org
Fri Dec 11 15:32:46 UTC 2020


On Fri, 2020-12-11 at 15:13 +0000, Jelmer Vernooij wrote:
> On Fri, Dec 11, 2020 at 02:51:20PM +0000, Sam Bull wrote:
> > Can anybody provide an example of some simple hooks?
> > 
> > I tried looking at documentation, but didn't get anywhere.
> > 
> > For example, a pre-commit hook which returns false and blocks the commit and
> > a
> > hook that runs an arbitrary command after a pull/merge would be great.
> 
> Was the documentation that you looked at
> https://www.breezy-vcs.org/doc/en/user-guide/hooks.html ?

I think when I last looked it was still talking about bazaar, so it's probably
been updated a little (although I notice it's still Python 2 syntax in the
examples).

I managed to do the pre-commit as you said, by adding it to the user config
directory. Is there a way to make it local to a particular repo? Is it possible
to have it part of the repo in such a way that it is automatically used? i.e.
someone uses 'brz branch' and then when they commit it runs automatically, with
no extra configuration.

Thanks,
Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20201211/b21b86db/attachment.sig>


More information about the bazaar mailing list