gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: [arch-users] hooks and remote archives


From: Alexander Deruwe
Subject: [Gnu-arch-users] Re: [arch-users] hooks and remote archives
Date: Thu, 21 Aug 2003 09:42:09 +0200
User-agent: Mutt/1.5.4i

On Wed, Aug 20, 2003 at 04:27:56PM -0700, Miles Egan wrote:
> I've gotten pretty used to having server-side commit hooks that send
> email when anyone working on a project commits a change in CVS and
> subversion.  From what I can tell from the documentation, it looks like
> arch only supports per-user hooks in ~/.arch_params/hook.  Is there any
> way to set up a common commit hook for all trees in an archive?

Well, there is a way, but it's a little inconvenient, as it relies on
your "main project tree" being at the same path all the time, or
maintenance of a symlink to the same place.  If all you want is a
post-commit hook, this limitation does not exist.

In the {arch} dir of your project, create scripts (or a single script)
for the hooks you need.  For example, hook.commit, or hook.branch.

In the case of post-commit, $ARCH_TREE_ROOT is set, so after determining
the correct archive and category (possibly branch as well, I imagine),
you can just source $ARCH_TREE_ROOT/{arch}/hook.commit from
~/arch-params/hook.

The new-branch hook is different, because it doesn't have
$ARCH_TREE_ROOT (tla make-branch doesn't use a project tree).  If you
want to do something project-specific here, you'll have to hardcode the
path to hook.branch (or maintain a symlink, and hardcode that).

This depends on every developer having the same chunk of code in their
hook scripts, and can be easily circumvented.

Hope that helps,

-- 
Alexander Deruwe
AQS-CarControl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]