Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Subversion Wiki" for 
change notification.

The "InheritedProperties" page has been changed by pburba:
http://wiki.apache.org/subversion/InheritedProperties?action=diff&rev1=33&rev2=34

Comment:
Adjust propget and proplist examples to reflect that any versioned property can 
be inherited.

  A child path that inherits a property from its parent may not have ready 
access to that parent in the working copy (e.g. the root of the working copy is 
a subtree of the parent path).  To ensure that traditionally disconnected 
operations (i.e. those that require no access to the repository, like 'svn 
add') remain disconnected, we will maintain a cache of properties inherited by 
the root of the working copy. Whenever a new working copy is checked out, any 
properties inherited by the root of the working copy will be cached in the 
working copy.  If a subtree within a working copy is switched, a separate cache 
will be created for the root of that subtree.  Whenever an update occurs the 
cache(s) will be refreshed.
  
  The cache will be stored in a new wc-ng table:
- ||||||||||<tablewidth="978px" tableheight="324px"style="font-weight:bold;     
         ;text-align:center">TABLE: INHERITABLE_PROPS ||
+ ||||||||||<tablewidth="978px" tableheight="324px"style="font-weight:bold;     
          ;text-align:center">TABLE: INHERITABLE_PROPS ||
  ||<style="font-weight:bold;">Name ||<style="font-weight:bold;">Data Type 
||<style="font-weight:bold;">Primary Key ||<style="font-weight:bold;">Foreign 
Key ||<style="font-weight:bold;">Notes ||
  ||wc_id ||integer ||Yes ||References NODES.WC_ID || ||
  ||local_relpath ||text ||Yes ||References NODES.LOCAL_RELPATH || ||
@@ -107, +107 @@

  This proposal purposefully avoids any concept of how inherited properties 
(possibly from multiple parents) might be merged together with explicit 
properties.  In some cases if a path has an inheritable property set on it, 
then it might make sense to consider that property's value as the complete and 
full value for that path, end of story (e.g. svn:mergeinfo).  On the other 
hand, it's easy to imagine use-cases where it might be useful to merge a path's 
explicit and inherited properties.  However, both cases depend on the semantics 
of the particular inherited property. There is no way to develop a 
one-size-fits-all approach to merging inheritable properties.  So while the 
suggested API changes below support the ability to get a path's explicit and 
inherited properties, how to merge these values (if at all) will be handled on 
a case-by-case basis.
  
  === Subcommand Changes ===
- In general inherited properties will be treated like any other versioned 
property, so most subcommands will only notice the paths on which explicit 
properties are set, regardless of whether these are inheritable or not.  For 
example, if we have an unmodified working copy and then make a local change to 
a parent path's explicit inheritable property:
+ Since "inherited" properties are really just a new way of looking at 
versioned properties, most subcommands will only notice the paths on which 
explicit properties are set.  For example, if we have an unmodified working 
copy and then make a local change to a parent path's explicit property:
  
   * 'svn status' won't show any property mods on the parent's children paths.
   * 'svn diff' will only show the property difference on the parent path.
@@ -119, +119 @@

   * update (up): Updates the inherited properties cache(s).
   * upgrade: Creates an empty inherited properties cache, but doesn't populate 
it since that would require contacting the repository which upgrade shouldn't 
need to do.
  
- Two subcommands, propget (pget, pg) and proplist (plist, pl), will support a 
new option enabling users to find inherited properties on a path: 
'--show-inherited-props'. When used, any inherited properties for the target of 
the subcommand will be displayed. Inherited properties for subtrees of the 
target are not shown. For example: Given this repository structure with the 
explicit properties noted:
+ Two subcommands, propget (pget, pg) and proplist (plist, pl), will support a 
new option enabling users to view inherited properties on a path: 
'--show-inherited-props'. When used, any properties inherited by the target of 
the subcommand will be displayed. Properties inherited by subtrees of the 
target are not shown. For example: Given this repository structure with the 
explicit properties noted:
  
  {{{
- /                svn:inheritable:foo=bar
+ /                prop:foo=bar
- branch/          svn:inheritable:foo=bat, prop:baz=qux
+ branch/          prop:foo=bat
- branch/src/      svn:inheritable:foo=bax
+ branch/src/      prop:foo=bax
  branch/src/pop.c
  branch/inc
  branch/inc/pop.h
@@ -139, +139 @@

  {{{
  >svn pl -vR ^/branch
  Properties on '%ROOT_URL%/branch':
-   svn:inheritable:foo
+   prop:foo
      bat
-   prop:baz
-     qux
  Properties on '%ROOT_URL%/branch/src':
-   svn:inheritable:foo
+   prop:foo
      bax
  
- >svn pg -R svn:inheritable:foo ^/
+ >svn pg -R prop:foo ^/
  %ROOT_URL% - bar
  %ROOT_URL%/branch - bat
  %ROOT_URL%/branch/src - bax
  
- >svn pg -v svn:inheritable:foo ^/branch
+ >svn pg -v prop:foo ^/branch
  Properties on '%ROOT_URL%/branch':
-   svn:inheritable:foo
+   prop:foo
      bat
  
- >svn pg svn:inheritable:foo ^/trunk
+ >svn pg prop:foo ^/trunk
  
  >
  }}}
- With the --show-inherited-props option, explicit properties are shown as 
normal, but any properties inherited by the target are also shown.  For 
example, a recursive propget on ^/branch shows the explicit properties on the 
target and its children, but also shows that the target inherits 
svn:inheritable:foo from the root of the repository:
+ With the --show-inherited-props option, explicit properties are shown as 
normal, but any properties inherited by the target are also shown.  For 
example, a recursive propget on ^/branch shows the explicit properties on the 
target and its children, but also shows that the target inherits prop:foo from 
the root of the repository:
  
  {{{
  >svn pl -R --show-inherited-props ^/branch
- Inheritable properties on '%ROOT_URL%':
-   svn:inheritable:foo
+ Properties inherited from '%ROOT_URL%':
+   prop:foo
  Properties on '%ROOT_URL%/branch':
+   prop:foo
-   svn:inheritable:foo
-   prop:baz
  Properties on '%ROOT_URL%/branch/src':
-   svn:inheritable:foo
+   prop:foo
  }}}
  A target with no explicit inheritable properties might still inherit a 
property from a parent:
  
  {{{
  >svn pg -v --show-inherited-props svn:inheritable:foo ^/trunk
- Inheritable properties on '%ROOT_URL%':
-   svn:inheritable:foo
+ Properties inherited from '%ROOT_URL%':
+   prop:foo
      bar
  }}}
  If a path inherits a property from multiple parents, all the parents are 
shown:
  
  {{{
- >svn pg -v --show-inherited-props svn:inheritable:baz ^/branch/src/pop.c
+ >svn pg -v --show-inherited-props prop:foo ^/branch/src/pop.c
- Inheritable properties on '%ROOT_URL%':
-   svn:inheritable:foo
+ Properties inherited from '%ROOT_URL%':
+   prop:foo
      bar
- Inheritable properties on '%ROOT_URL%/branch':
-   svn:inheritable:foo
+ Properties inherited from '%ROOT_URL%/branch':
+   prop:foo
      bat
- Inheritable properties on '%ROOT_URL%/branch/src':
-   svn:inheritable:foo
+ Properties inherited from '%ROOT_URL%/branch/src':
+   prop:foo
      bax
  }}}
  If the target is a WC path and some of the inherited properties come from the 
repository, those from the repository are listed by URL rather than WC path:
@@ -208, +205 @@

  
  >cd branch-WC
  
- >svn pg -vR svn:inheritable:foo
- Inheritable properties on '%ROOT_URL%':
-   svn:inheritable:foo
+ >svn pg -vR prop:foo
+ Properties inherited from '%ROOT_URL%':
+   prop:foo
      bar
  Properties on '.':
-   svn:inheritable:foo
+   prop:foo
      bat
  Properties on 'src':
-   svn:inheritable:foo
+   prop:foo
      bax
  }}}
  The above examples apply only to custom user inheritable properties.  
Subversion reserved properties that we deem inheritable may exhibit differing 
behavior, depending on how we define inheritance merging for the property in 
question.  For example, {{{svn pg svn:mergeinfo --show-inherited-props -v 
^/branches/projX/src}}} would show either the explicit mergeinfo on 
{{{^/branches/projX/src}}} or the mergeinfo existing on {{{src's}}} nearest 
path-wise parent with explicit mergeinfo (or possible nothing if there was no 
explicit mergeinfo on the target or its parents).

Reply via email to