Using server side hook to check files changed
Vincent Ladeuil
vila+bzr at canonical.com
Wed Oct 24 07:50:52 UTC 2012
>>>>> Stuart Moore <stuart.moore+bzr at spektrix.com> writes:
> Hello,
> We're trying to use a server-side hook to check which files are changed in
> a commit,
Hmm, commits require a working tree so if you really want to forbid some
stuff you need to do that where the commit happens: the dev's machine.
> and if those changes are inappropriate (e.g. including temporary
> files) prevent that change being committed. (Ideally I'd also be
> able to examine those files' contents before the commit happened.)
> I've had a real problem working out how I'm meant to do this - I've been
> investigating the "pre_change_branch_tip" hook, but it doesn't seem to have
> any way of geting a list of the files changed in this commit.
That's because the commit already happened, you're dealing with
revisions at this point. You can only forbid *merging* or *pushing* revisions
with forbidden stuff.
Vincent
More information about the bazaar
mailing list