On Jan 31, 2007, at 16:13, Fedor, Halina ((Mission Systems)) wrote:
> Is there any kind of script that is available that will enforce a
> repository-level (global) lock/unlock policy? The reason is
> because one of our planned subversion repositories will contain
> mostly unmergeable files...In other words, we want the needs-lock
> property to be applied to the entire repository contents and any
> new files added to it.
>
> I was not sure if the pre-lock-require-needs-lock.py would meet our
> needs.. The description reads"..verifies that the PATH that USER is
> attempting to lock has the svn:needs-lock property set on it,
> returning success if it does"…implies that only files that already
> have the needs-lock will enable a user to lock it for exclusive
> use; however, will the needs-lock need to be set manually for each
> and every new file that gets created or is there an automatic way
> we can do this via some sort of other script?
>
> We are also looking to enforce locks for only certain filetypes for
> our source code repository. Didn’t know if there might also be a
> way to do this via a script (e.g. any new files that get committed
> that contain a .pdf, .gif, etc. extension, for example, will
> automatically have their svn:needs-lock property set to true upon
> commit).
For both cases, you will need to write a pre-commit hook script that
rejects the commit of any file that does not have the properties you
want. You will examine the contents of the in-progress transaction
using svnlook. For the unmergeable-file repository, your script will
want to make sure that each and every file has the svn:needs-lock
property. For the source repository, you will want to limit that
restriction to just certain filename extensions.
--
To reply to the mailing list, please use your mailer's Reply To All
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 1 00:34:03 2007