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

Pre-commit hook to restrict mkdir

From: Don Caprio <Donald.Caprio_at_Sun.COM>
Date: 2006-09-29 19:57:35 CEST

I'm new to subversion so I appoligize in advance for any stupid newbie questions.

I'd like to restrict my users from creating top-level directories. After looking
through the docs and FAQ's it appears that the best way would be to create a
pre-commit hook. Am I on the right path or is there a better way? The Apache
mod_dav_svn module would fit the bill but clients will be using command-line.

I've done some poking around with the pre-commit script however I'm having some
trouble figuring it all out.

The command 'svn mkdir file:///repos/projectA -m "make initial project dir"
generates the following hook variables:

***START pre-commit script. TXN=y REPOS=/repos
author: caprio
changed: A projectA/
dirs-changed: /
proplist:
propget:
***END pre-commit script

If dirs-changed = "/" and changed: = "A" would I be correct in interpreting that
user wishes to create 'projectA' in the repos root dir?

Any help/pointers would be greatly appreciated.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 29 19:58:48 2006

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.