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

Re: [RFC] Inheritable Properties Branch: Ready for Review

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 13 Sep 2012 19:59:21 +0100 (BST)

Paul Burba wrote:
> On Thu, Sep 13, 2012 at 10:47 AM, Julian Foad wrote:
>>  parent dir in repo   NODE
>>  |                      | \_____________
>>  |                      v               v
>>  +-wc root dir        BASE            ACTUAL
>>    |                    |               |
>>    |                    v               v
>>    +-doc              BASE            ACTUAL
>>      |                  |               |
>>      |                  v               v
>>      +-README         BASE            ACTUAL
>
> This isn't quite what I had in mind (nor how the branch is currently
> implemented).  Recall from above when we ask for README's base:
>
> $ svn pl -v -rBASE --show-inherited-props ./doc/README
> Properties inherited from 'file:///home/julianfoad/tmp/svn/inh/repo':
>    p
>      b1
> Properties inherited from
> 'file:///home/julianfoad/tmp/svn/inh/repo/doc':
>    p
>      b2
> Properties on 'doc/README':
>    p
>      b3
>
> The properties inherited by README are not obtained from the WC at
> all, but are from the repository (hence the URLs).  What is happening
> is really this:
>
> parent dir in repo   NODE
> |                      | \_____________
> |                      |               v
> +-wc root dir        repos           ACTUAL
>    |                  parent            |
>    |                  NODE              |
>    |                    |               |
>    |                    |               v
>    +-doc              repos           ACTUAL
>      |                parent            |
>      |                NODE              |
>      |                  |               |
>      |                  v               v
>      +-README         BASE            ACTUAL

OK, thanks for explaining.  I think I follow.

The difference with what you have just explained pertains mainly to a mixed-rev WC.  Perhaps we could draw it like this, where the intention is to show, for every node, the chain of other nodes that this node inherits properties from:

                REPOSITORY      WC-BASE     WC-ACTUAL
              r10  r20  r30   (mixed-rev)

parent        (O)  (O)  (O)
|              |\\_ | __ | __________________
|              | \_ | __ | ________          \
|              v    v    v         v          v
+-x           (O)  (O)  (O)      (@10)       (O)
  |            |    |    | \_______           |
  |            v    v    v         v          v
  +-doc       (O)  (O)  (O)      (@30)       (O)
    |          |    | \_ | ________           |
    |          v    v    v         v          v
    +-README  (O)  (O)  (O)      (@20)       (O)

"(O)" just means a node; "(@10)" means a node from the specified revision.

Does that diagram look right to you?

(Why am I spending considerable effort on trying to draw a diagram to represent the semantics?  Because I think it is a very powerful means of communication.)

I'm seeing something in the above diagram that may be troubling.  It says that, in a mixed-rev WC, if I have no local mods, nevertheless the full set of properties (including inherited props) in effect on an ACTUAL node is different from the full set of props that are in effect on the correcponding BASE node.  In other words, a diff that includes inherited props would show a difference even though (in another sense) there are no local mods.  That seems unintuitive to me.  How about you?

>>  (If at this point you're wondering what other picture I could possibly
> have imagined, your "principle: Inheritance within the WC is within the
> actual tree" made me wonder if you meant something like this:
>>
>>    wc                 b1              a1
>>    |                    _____________/ |
>>    |                   v               v
>>    +-doc              b2              a2
>>      |                  _____________/ |
>>      |                 v               v
>>      +-README         b3              a3
>>
>>  since I consider BASE nodes as well as ACTUAL nodes to be within the WC.)
>
> That's why I tried to emphasize in the recent wiki updates
> (http://wiki.apache.org/subversion/InheritedProperties#Working_Copy_Inheritance_Rules)
> that there is a difference between the "default" WC inheritance, which
> occurs in the actual tree, and inheritance that occurs when we provide
> a operative/peg revision.

I see; I hadn't realized that 'default WC inheritance' referred to the inheritance that is seen when a revision specifier is defaulted on some command.  Can we say "'actual' tree inheritance" or "'actual' props inheritance" instead of "default inheritance"?

As a meta-observation, it is often useful to define behaviour in terms of tree states and such (a model of the WC, a model of the repository), and to mention command-line parameters only in illustrations and concrete examples.

- Julian
Received on 2012-09-13 20:59:57 CEST

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.