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

Re: server-side auto-set svn-prop: need-lock

From: <kmradke_at_rockwellcollins.com>
Date: Thu, 7 Aug 2008 13:45:36 -0500

Paul R <paul.r.ml_at_gmail.com> wrote on 08/07/2008 09:15:21 AM:
> Hello dear subversion users list,
>
> We are about to provide a service in which companies use SubVersion to
> synchronize their files. Those files, mainly Word and Excel files,
> will all be considered as binary so file content is not likely to be
> mergeable at all. To avoid endless conflicts resolution for non-tech
> peoples, we want to be able to automatically activate property
> need-lock on every files added to the repository. Yes, this is
> a non-orthodox use case of SubVersion. I read the following post
> http://svn.haxx.se/users/archive-2006-04/0415.shtml but the given
> solution implies client-side settings, which is not an option for our
> case. I am really looking for a server-side solution.
>
> Any idea please ? Thanks

I don't recommend it (even though I wrote it), but you can install
a server side hook that adds the missing needs-lock property as
a new commit if it is missing. (Or you can run the script
periodically to do the same, but for multiple files at a time.)

The biggest problem is user confusion, since as soon as they
checkin a file with the missing properties, their version is
obsolete. They wouldn't expect this and have no way to know
this unless they do an update right after they do the commit.

In any case, it can be found here:

http://svn.collab.net/repos/svn/trunk/contrib/server-side/add-needs-lock.py

It requires the python subversion bindings, and needs direct access
to the repository. It operates directly on the repository, so
no intermediate working copy is needed on the Subversion server.

It could be extended to handle arbitrary autoprops, but is currently
limited to the needs-lock property.

Kevin R.
Received on 2008-08-07 20:46:04 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.