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

svn:needs-lock on all files (was Re: anything corresponding to pinning in VSS)

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-01-27 11:39:37 CET

On Jan 27, 2006, at 11:10, Suruchi Parimu wrote:

> I have another query... Subversion has provision whereby anybody
> can edit a
> file without locking it unless the "Needs Lock" is specified... is
> there a
> way by which we can have the "Needs Lock" set automatically when a
> file is
> added. Of course the pre-commit hook can help here too, but is there a
> solution other than that.

You can enable auto-props on each client to automatically set the
svn:needs-lock property on every file.

http://svnbook.red-bean.com/nightly/en/
svn.advanced.props.html#svn.advanced.props.auto

Then you can write a pre-commit hook which rejects the commit of any
file that does not have this property set, to catch those people who
forgot to set up their auto-props. The error message the pre-commit
hook prints could point users to a web site where they can download
your recommended version of the config file, already all set up.

This is called the "lock-modify-unlock" model. While you can make
Subversion work like this, most people find "copy-modify-merge" to
work better, once they get used to it. Read about the differences:

http://svnbook.red-bean.com/nightly/en/svn.basic.vsn-models.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jan 27 11:43:10 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.