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

Locking by default

From: larzeni <l.arzeni_at_iname.com>
Date: Mon, 2 Feb 2009 19:08:55 -0500

Hi there!
At my company, we are starting a little project to check if subversion
can suit to our needs.
While we found the sw very well done, we still have an issue regarding
locks.

We understand that subversion uses, by default, the copy/modify/merge
instead of lock/modify/unlock model.
We understand also that, if a file needs the lock/modify/unlock model, it
can be obtained using the svn:needs-lock property on the file.

Since we are going to use almost on all files the lock/modify/unlock
model, we fear that we will impose a heavy burden on the server.

We would like to invert the default behaviour of subversion, and to make
this behaviour available to all user, we would like to:

- put a parameter in the svnserve.conf [general] section, to set the
default model (LOCK or MERGE); default will be MERGE and add a property
"svn:disable-lock" available for every single file

- when model is MERGE and svn:needs-lock is not set for a file, the file
that has this property set can be checked-out without lock (this is the
current behaviour)
- when model is MERGE , svn:disable-lock is not meaningful

- when model is LOCK and svn:disable-lock set for a file, the file that
has this property set can be checked-out without lock. (same as MERGE and
svn:needs-lock not set)
- when model is LOCK, svn:needs-lock is not meaningful (new behaviour:
pessimistic lock by default, avoiding to set a property for every file)

we think that we could use svn:needs-lock setting the value to TRUE and
FALSE, but this would need more changes to svn server and clients;
instead, by using a new attribute, we feel that most applications can run
without hassles.

Is there anyone that can confirm that our analysis is right, or show us
failures?

We think that a quick way to implement this behaviour would be to modify,
in file props.c:

svn_error_t *
svn_wc_prop_get(const svn_string_t **value,
const char *name,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool)

if MERGE is set, it will have current behaviour,
if LOCK is set, it will return TRUE for every request that ask for
svn:needs-lock property.

Is this right? Can someoune point us to other sections of code to modify?

Thanks, larzeni

-- 
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com
Received on 2009-02-03 10:37:32 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.