{pre,mid,post}-commit hooks?

Charles Duffy cduffy at spamcop.net
Mon Jan 16 23:19:36 GMT 2006


John A Meinel wrote:
> Why isn't it possible to add something to the build step? What is
> creating the spec file that is supposed to keep it up-to-date? (as
> far as I know $Id$ wouldn't do the right thing either anyway).

Because the build step is called by RPM *after* it's already read the
spec file. This isn't for --version output or such; rather, it's for the
actual RPM package itself that's being built.

> If you are truly doing a pre-commit hook, you can create a plugin
> which decorates 'cmd_commit' so that it updates whatever you need
> before running the real cmd_commit.

Now, *that* is darned nifty. Thanks!

(It's a shame that having the hooks be branch-local would be such a
security issue... I'm almost tempted to write a plugin that allows
branch-local hooks to be run so long as they're GPG-signed with a key
the current user trusts).





More information about the bazaar mailing list