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

RE: Re: Enforcing locks for the entire repository

From: Fedor, Halina \(Mission Systems\) <Halina.Fedor_at_ngc.com>
Date: 2007-02-01 17:02:30 CET

Thanks much! We'll give it a go.

Halina

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2007a@ryandesign.com]
Sent: Wednesday, January 31, 2007 6:34 PM
To: Fedor, Halina (Mission Systems)
Cc: users@subversion.tigris.org
Subject: Re: Enforcing locks for the entire repository

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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 1 17:23:32 2007

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.