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

Re: inheritable properties names (was: Re: svn commit: r1404404 - /subversion/site/publish/docs/release-notes/1.8.html)

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 1 Nov 2012 14:30:56 +0000 (GMT)

Mark Phippard wrote:

> Julian Foad wrote:
>> For ignores, I have an alternative proposal.  Instead of adding a second
>> property name, may I suggest keeping the existing property name and
>> extending the syntax of its value.
>>
>> Currently
>>
>>   svn:ignore =
>>     Makefile
>>     *.obj
>>
>> applies those two patterns to the immediate children only.
>
> I do not agree with this one.  I think you are overlooking that the
> the inheritable properties are merged together with closest property
> having precedence.

I'm not sure what you're saying here.  The new client-side API [1] for retrieving a given property name will return a list of all the values set on the various parents, and it's then up to the caller to decide how to merge them.

[1] <http://wiki.apache.org/subversion/InheritedProperties#API_Changes>

>  I do not see how you can do that with the existing
> svn:ignore property in any way that is useful without changing the
> behavior.

Do it like this:

  inh_ignores = get_property(path, "svn:ignore", include_inherited=True)
  # inh_ignores is a mapping from "path-on-which-it's-set" to "pattern-list".
  sort inh_ignores by "path-on-which-it's-set", in root-to-leaf order.
  final_ignore_patterns = (an empty set)
  for each pattern-list in inh_ignores:
    for each pattern in pattern-list:
      final_ignore_patterns.add_or_replace(pattern)

>  I like the idea of a new property for this.

Why?

- Julian
Received on 2012-11-01 15:31:33 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.