svn::auto-props and svn:needs-lock

191 views
Skip to first unread message

Sebastian Weilhammer

unread,
Dec 8, 2021, 5:30:01 PM12/8/21
to us...@subversion.apache.org
Hello,

I'm having trouble with these features.

I have a folder on which I have set svn:auto-props to *=svn:needs-lock=*.
I have another folder within this folder for which I would like anything inside to not require locks.

It seems, I have no way of removing auto setting the needs lock property on newly added files?

This makes sense I guess, considering svn:needs-lock doesn't require a value, just needs to be set.
Feels like the needs-lock requiring either 0 or 1 as a value would make this customizable?

Am I correct in my assumption? Or is there a way of handling this specific scenario gracefully?

Best,

Sebastian

 

Justin MASSIOT | Zentek

unread,
Dec 9, 2021, 3:18:11 AM12/9/21
to Sebastian Weilhammer, Subversion
Hi Sebastian,

As far as I've understood, since Subversion 1.8 the property "svn:auto-props" is automatically inherited.
Have you tried to overcharge the property at the node you want a variation? Not sure but it might take precedence...

Justin MASSIOT  |  Zentek

Sebastian Weilhammer

unread,
Dec 9, 2021, 4:43:52 AM12/9/21
to Justin MASSIOT | Zentek, Subversion
Hello Justin,

So that's the thing, I cannot seem to remove the svn:needs-lock from svn:auto-props for the node in question and I can't change it's value in such a way where it will stop adding svn:needs-lock to newly added files. If that's what you mean by overcharge?

Essentially setting svn:auto-props to *=, *=svn:needs-lock= or *=svn:needs-lock does not get this to work.
--

Sebastian Weilhammer

Technical Director

madheadgames.com

   

Justin MASSIOT | Zentek

unread,
Dec 9, 2021, 4:47:45 AM12/9/21
to Sebastian Weilhammer, Subversion
By overcharge I meant "define a new property with a value which differs from the one that is inherited", either for svn:auto-props or svn:needs-lock.
I'm really not sure it would work, but it's worth the try.

Justin MASSIOT  |  Zentek

Sebastian Weilhammer

unread,
Dec 9, 2021, 5:19:00 AM12/9/21
to Justin MASSIOT | Zentek, Subversion
Is that not what I'm doing by setting svn:auto-props to *= on the child node?

Justin MASSIOT | Zentek

unread,
Dec 9, 2021, 5:31:39 AM12/9/21
to Sebastian Weilhammer, Subversion
Not if the needs-lock attribute is also set by a "svn:auto-props" property, I suppose.

Justin MASSIOT  |  Zentek

Daniel Sahlberg

unread,
Dec 10, 2021, 4:13:11 AM12/10/21
to Sebastian Weilhammer, Justin MASSIOT | Zentek, Subversion
Den tors 9 dec. 2021 kl 11:18 skrev Sebastian Weilhammer <sebastian....@madheadgames.com>:
Is that not what I'm doing by setting svn:auto-props to *= on the child node?

I have tried the following, I think this is matches what you are trying to do. This is done using Subversion 1.14.1:
[[[
D:\Dev\test_trunk>mkdir X

D:\Dev\test_trunk>svn add X
A         X

D:\Dev\test_trunk>svn propset svn:auto-props "*=svn:needs-lock=*" X
property 'svn:auto-props' set on 'X'

D:\Dev\test_trunk>echo "xx" >X\xx

D:\Dev\test_trunk>svn add X\xx
A         X\xx

D:\Dev\test_trunk>mkdir X\Y

D:\Dev\test_trunk>svn add X\Y
A         X\Y

D:\Dev\test_trunk>echo "xy" >X\Y\xy

D:\Dev\test_trunk>svn add X\Y\xy
A         X\Y\xy

D:\Dev\test_trunk>svn proplist -vR X
Properties on 'X':
  svn:auto-props
    *=svn:needs-lock=*

Properties on 'X\Y\xy':
  svn:needs-lock
    *

Properties on 'X\xx':
  svn:needs-lock
    *
]]]

So far nothing remarkable: the file X\xx got svn:needs-lock=* as expected. X\Y\xy also got it, which shows that the svn:auto-props is recursive (as indicated by Justin).

[[[
D:\Dev\test_trunk>svn propset svn:auto-props "*=svn:needs-lock=" X\Y
property 'svn:auto-props' set on 'X\Y'

D:\Dev\test_trunk>echo "xy2" >X\Y\xy2

D:\Dev\test_trunk>svn add X\Y\xy2
A         X\Y\xy2

D:\Dev\test_trunk>svn proplist -vR X
Properties on 'X':
  svn:auto-props
    *=svn:needs-lock=*

Properties on 'X\Y':
  svn:auto-props
    *=svn:needs-lock=

Properties on 'X\Y\xy':
  svn:needs-lock
    *
Properties on 'X\Y\xy2':
  svn:needs-lock
    *
Properties on 'X\xx':
  svn:needs-lock
    *

D:\Dev\test_trunk>
]]]

Now, I think what you are asking is why X\Y\xy2 gets svn:needs-lock and if there is a way to avoid it? I think this is an interesting question and it doesn't seem to be handled very well in my opinion. I feel that the *=svn:needs-lock= should be handled as "don't set svn:needs-lock at all" but as you say, svn:needs-lock doesn't require a specific value to apply, which is probably why it is set on X\Y\xy2.

This might be a "by design" think, or it might be something that we can consider to change.

I hope to find the time to look a little more closely during the holidays.

Kind regards,
Daniel
Reply all
Reply to author
Forward
0 new messages