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

Re: Need possibilities to set Subversion property for keyword expansion

From: <kmradke_at_rockwellcollins.com>
Date: Fri, 8 May 2009 08:28:22 -0500

Ryan Schmidt <subversion-2009a_at_ryandesign.com> wrote on 05/08/2009
04:49:44 AM:

> On May 8, 2009, at 00:37, Ramachandran, Vishwanath(IE10) wrote:
>
> > I need to know if it would be possible to make modifications on the
> > subversion server side for the repository in a way that everytime a
> > new
> > item is added to the repository it will get added (automatically on
> > server side) the property svn:needs-lock .
> >
> > I think that it is possible to locally set on the Tortoise client a
> > special setting in the config file in the section "auto-props". The
> > disadvantage with that is that each client has to do this on his
> > machine
> > seperately.
> >
> > First i need to have this information if this is possible to implement
> > on the server (and if you could do this)-> Pls let me know. Also i
> > need
> > the information if there are any side effects or disadvantages of
> > doing
> > this on the server.
> >
> > Before really setting up the repository i have to confirm you that we
> > really want to go this way
>
> Yes, you can do it on the server, but it is not recommended. You
> cannot (well, with language bindings maybe you can, but in any case
> you absolutely must not) change the incoming transaction. Therefore,
> your only option is to immediately commit a second revision to fix a
> preceding revision that does not have the correct properties set.
> This is difficult because the server must maintain a working copy in
> which to perform these changes, and there are race conditions to
> think about, not to mention the fact that a developer's working copy
> will be immediately outdated after committing, which the developer
> would not ordinarily expect.

You don't need a working copy on the server. Here is a script I
wrote using the python api to add the missing svn:needs-lock properties
as a new transaction in a post-commit hook script:

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

Even though I created that, I would still recommend configuring auto-props
on all the clients if possible. The extra transactions created with
the above script will confuse some users. (And it has never been
extended for arbitrary properties, so there would be work to do if
you want/need more than just svn:needs-lock.)

Kevin R.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-08 15:29:34 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.