[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svnhook question

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Sat, 15 Mar 2014 17:18:42 +0100

Op 15-mrt.-2014 04:08 schreef "Andreas Stieger" <andreas.stieger_at_gmx.de>:
>
> Hello,
>
> On 14/03/14 17:15, Havlovick, Ron wrote:
> > When the last person commits their files into svn, post svnhook I
> > believe, an asci file will be created or written to, which contains the
> > revision number of that last svn commit.
>
> Contrary to what Henrik wrote.. just ad a post-commit hook with
> something like this:
>
> GNU/Linux:
>
> #!/bin/sh
> REPOS="$1"
> REV="$2"
> echo "$REV" > /path/to/file.txt
>
> Windows:
>
> SET REPOS-PATH=%1
> SET REV=%2
> echo %REV% > C:\Path\to\file.txt
>

Careful: this does not guarantee that file.txt contains the last committed
revision. The post-commit hook can be running concurrently for multiple
commits, so there is a race here.

Johan
Received on 2014-03-15 17:19:14 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.