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

Re: Excluding directories on a sticky basis

From: Jonas Widarsson <jonas_at_widarsson.com>
Date: 2005-01-04 20:36:39 CET

Thankyou!
I didn't discover that possibilty myself.
However, you speak of the commit procedure, and I want to filter checkouts.
The chapter you provided a link to says :
"Currently there are five hooks implemented by the Subversion repository"
These are:
start-commit
pre-commit
post-commit
pre-revprop-change
post-revprop-change

What a pity there is no post-checkout...

Maybe I have to leave this unusual idea. Anytime I mention this people say
"Why would you what to do that". I guess it is an odd request.

Thanks anyway.

/Jonas

On Tuesday 04 January 2005 19:57, Christopher Ness wrote:
> On Tue, 2005-04-01 at 02:43 +0100, Jonas Widarsson wrote:
> > Is this possible?
>
> Try a pre-commit script to reject commits with whatever "sticky dirs"
> you do not want to commit.
>
> This is not optimal since the entire commit is rejected and forces the
> developer to figure out why it was rejected (a good pre-commit script
> would write the reason to STDERR).
>
> Here is a simple example that rejects commits to any repository URL with
> the word tag in it. YMMV based on how well you can write programs to
> verify transactions.
>
> #########################################################
> # Make sure that the log message contains some text.
> SVNLOOK=/usr/local/bin/svnlook
>
> # Don't allow commits to anything in the "tag" directory
> ${SVNLOOK} changed -t $2 $1 | grep "^U\W*tag" > /dev/null && /bin/echo
> "Cannot commit to tag directory
> Try /trunk or /branch!" 1>&2 && exit 1
>
> # All checks passed, so allow the commit.
> exit 0
> #########################################################
>
> More info here:
> http://svnbook.red-bean.com/en/1.0/ch05s02.html#svn-ch-5-sect-2.1
>
> Cheers,
> Chris

-- 
Jonas Widarsson
tel: +46 271 152 00 - tel: +46 271 121 42 (hemma/home) - gsm: +46 70 539 64 79
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jan 4 20:39:18 2005

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.