You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by John <Jo...@DMJ-Consultancy.co.uk> on 2006/10/25 20:50:27 UTC
Post-commit hooks - can they tell what's just been committed?
Is it possible to determine which projects have just been committed to
SVN when running a post-commit hook (or any other hook)?
TIA
John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
SOLVED (for now) Re: Post-commit hooks - can they tell what's just
been committed?
Posted by John <Jo...@DMJ-Consultancy.co.uk>.
Ryan Schmidt wrote:
>
> On Oct 25, 2006, at 15:50, John wrote:
>
>> Is it possible to determine which projects have just been committed to
>> SVN when running a post-commit hook (or any other hook)?
>
> The post-commit hook is given the file-system path of the repository
> and the revision number that was just committed. You can pass these to
> "svnlook changed" or "svnlook dirs-changed" to determine what was
> changed in this revision.
Thanks! That looks, at first glance, like some fun shell scripting. I'll
have to play.
>
> As to the other hooks, which ones are you thinking of?
None specifically at the moment but I take your point that they must be
post rather than pre.
>
> The pre-commit hook runs before the commit is finished, so it
> obviously cannot see into the future to see what *has* been committed.
> It can, however, see what *is about to be* committed. It is given the
> repository path and a transaction ID, which svnlook also accepts.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Post-commit hooks - can they tell what's just been committed?
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 25, 2006, at 15:50, John wrote:
> Is it possible to determine which projects have just been committed to
> SVN when running a post-commit hook (or any other hook)?
The post-commit hook is given the file-system path of the repository
and the revision number that was just committed. You can pass these
to "svnlook changed" or "svnlook dirs-changed" to determine what was
changed in this revision.
As to the other hooks, which ones are you thinking of?
The pre-commit hook runs before the commit is finished, so it
obviously cannot see into the future to see what *has* been
committed. It can, however, see what *is about to be* committed. It
is given the repository path and a transaction ID, which svnlook also
accepts.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org