SVN lock on directory (property change only)

1,165 views
Skip to first unread message

Dennis.Ge...@zf.com

unread,
Mar 15, 2012, 10:38:49 AM3/15/12
to us...@tortoisesvn.tigris.org

Hi,

 

is this generally not possible with SVN or is it just missing in TortoiseSVN (using TortoiseSVN 1.7.6, Build 22632 - 32 Bit , 2012/03/08 18:29:39)?

 

Background:

We are using svn:externals property to set all our components to the currently released version (they reside in a separate components repository).

The normal developer should not be allowed to commit changes to the svn:externals property (only locally in his working copy to continue development).

So my idea was to always keep that property locked, but TortoiseSVN only allows me to lock files.

 

Thank you very much.

 

Kind regards,

 

Dennis Gertitschke

Dale McCoy

unread,
Mar 15, 2012, 11:25:00 AM3/15/12
to us...@tortoisesvn.tigris.org
On Thu, Mar 15, 2012 at 10:38, <Dennis.Ge...@zf.com> wrote:
> We are using svn:externals property to set all our components to the
> currently released version (they reside in a separate components
> repository).
>
> The normal developer should not be allowed to commit changes to the
> svn:externals property (only locally in his working copy to continue
> development).
>
> So my idea was to always keep that property locked, but TortoiseSVN only
> allows me to lock files.

A lock prevents the developer from changing whatever-is-locked, even
locally. For this workflow, I think you want a pre-commit script on
the server instead.

Dale McCoy

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2936182

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Simon Large

unread,
Mar 15, 2012, 11:27:51 AM3/15/12
to us...@tortoisesvn.tigris.org
On 15 March 2012 15:25, Dale McCoy <dale...@gmail.com> wrote:
> On Thu, Mar 15, 2012 at 10:38,  <Dennis.Ge...@zf.com> wrote:
>> We are using svn:externals property to set all our components to the
>> currently released version (they reside in a separate components
>> repository).
>>
>> The normal developer should not be allowed to commit changes to the
>> svn:externals property (only locally in his working copy to continue
>> development).
>>
>> So my idea was to always keep that property locked, but TortoiseSVN only
>> allows me to lock files.
>
> A lock prevents the developer from changing whatever-is-locked, even
> locally. For this workflow, I think you want a pre-commit script on
> the server instead.

Agreed.

Locks are not binding, only advisory. And they are implemented by the
subversion library, not TSVN, so there is no way to do what you are
asking using current SVN functionality.

Simon

--
:       ___
:  oo  // \\      "De Chelonian Mobile"
: (_,\/ \_/ \     TortoiseSVN
:   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
:   /_/   \_\     http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2936184

Bob Archer

unread,
Mar 15, 2012, 2:53:00 PM3/15/12
to us...@tortoisesvn.tigris.org
> On 15 March 2012 15:25, Dale McCoy <dale...@gmail.com> wrote:
> > On Thu, Mar 15, 2012 at 10:38,  <Dennis.Ge...@zf.com> wrote:
> >> We are using svn:externals property to set all our components to the
> >> currently released version (they reside in a separate components
> >> repository).
> >>
> >> The normal developer should not be allowed to commit changes to the
> >> svn:externals property (only locally in his working copy to continue
> >> development).
> >>
> >> So my idea was to always keep that property locked, but TortoiseSVN
> >> only allows me to lock files.
> >
> > A lock prevents the developer from changing whatever-is-locked, even
> > locally. For this workflow, I think you want a pre-commit script on
> > the server instead.
>
> Agreed.
>
> Locks are not binding, only advisory. And they are implemented by the
> subversion library, not TSVN, so there is no way to do what you are asking using
> current SVN functionality.
>
> Simon

My understanding is all a "lock" does nothing locally. If you have svn:needs-lock set all it does it set the local file to read only.

So, I do think you can lock the files and the users should be able to change them locally. What am I missing?

BOb

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2936241

Simon Large

unread,
Mar 15, 2012, 4:06:41 PM3/15/12
to us...@tortoisesvn.tigris.org
On 15 March 2012 18:53, Bob Archer <Bob.A...@amsi.com> wrote:
>> On 15 March 2012 15:25, Dale McCoy <dale...@gmail.com> wrote:
>> > On Thu, Mar 15, 2012 at 10:38,  <Dennis.Ge...@zf.com> wrote:
>> >> We are using svn:externals property to set all our components to the
>> >> currently released version (they reside in a separate components
>> >> repository).
>> >>
>> >> The normal developer should not be allowed to commit changes to the
>> >> svn:externals property (only locally in his working copy to continue
>> >> development).
>> >>
>> >> So my idea was to always keep that property locked, but TortoiseSVN
>> >> only allows me to lock files.
>> >
>> > A lock prevents the developer from changing whatever-is-locked, even
>> > locally. For this workflow, I think you want a pre-commit script on
>> > the server instead.
>>
>> Agreed.
>>
>> Locks are not binding, only advisory. And they are implemented by the
>> subversion library, not TSVN, so there is no way to do what you are asking using
>> current SVN functionality.
>>
>> Simon
>
> My understanding is all a "lock" does nothing locally. If you have svn:needs-lock set all it does it set the local file to read only.
>
> So, I do think you can lock the files and the users should be able to change them locally. What am I missing?

The OP wants to put a lock on the svn:external properties so that
developers can make local changes but cannot commit any changes to
this property.

Simon

--
:       ___
:  oo  // \\      "De Chelonian Mobile"
: (_,\/ \_/ \     TortoiseSVN
:   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
:   /_/   \_\     http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2936270

Dennis.Ge...@zf.com

unread,
Mar 16, 2012, 3:26:49 AM3/16/12
to us...@tortoisesvn.tigris.org
Hi,

thanks for the information.
I will check with our IT department if a server hook script can be made.

Simon

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2936270

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2936600

Reply all
Reply to author
Forward
0 new messages