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

Re: Set Default lock using svn+apache+ssl

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Wed, 29 Jul 2009 00:34:06 -0500

On Jul 28, 2009, at 20:21, Alexandre Moraes wrote:

> I'm having a problem in configure svn to lock every file as default.

There is no way to do that. But you can set it up so that all files
require themselves to be locked before changes can be made. I think
that's what you really meant.

> I know the copy-modify-merge solution but my boss doesn't want this
> for now. I tried to show him the best practices using svn but it
> didn't work. Maybe in a new future.

That's a shame! :)

> I found some pages that say I have to change the property enable-
> auto-props, in config file under the root/.subversion. I installed
> subversion using root account.
>
> I did it but, it didn't work.

Well, it didn't do what you thought it should do, perhaps. Editing
the config file in the .subversion directory in anyone's home
directory will cause those settings to apply when that user is using
the repository as a client. So, editing the file in
root's .subversion directory will have an effect whenever you use the
svn command line client as root. It's not what you were trying to do,
but that's what editing that file does.

> I tought about who is the user that access subversion using
> apache. It's wwwrun, I think. But I didn't found any subversion
> directory under the wwwrun folder.

Irrelevant; the .subversion directory is for Subversion clients, not
for Subversion servers.

> How can I make this work?

I would suggest you do both of these things:

1. Set up auto-props on every client computer so that every file
automatically gets the svn:needs-lock property added.

2. Write a pre-commit hook in the repository so that any commit of a
new file that does not have the svn:needs-lock property gets rejected.

In this way, you ensure that all files in the repository will have
the svn:needs-lock property on them, which will require everyone to
"svn lock" a file before they can edit it.

Note that by default any user can steal any other user's lock. I
believe there are more hook scripts you can write to prevent that.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2376491

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-29 10:49:24 CEST

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.