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=24&rev2=25

Comment:
Tweak the proposed svn propget and proplist changes so as to support a broader 
range of inheritance models.

  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 || ||
@@ -117, +117 @@

   * 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.  At operational depths 
greater than empty however, the inherited mergeinfo subtree targets is 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 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:
  
  {{{
- /                  svn:inheritable:foo=bar
+ /                svn:inheritable:foo=bar
- branches/          svn:inheritable:baz=qux
+ branch/          svn:inheritable:foo=bat, prop:baz=qux
- branches/src/
+ branch/src/      svn:inheritable:foo=bax
- branches/src/foo.c
+ branch/src/pop.c
- branches/inc
+ branch/inc
- branches/inc/bar.h
+ branch/inc/pop.h
  trunk/
  trunk/src/
- trunk/src/foo.c
+ trunk/src/pop.c
  trunk/inc
- trunk/inc/bar.h
+ trunk/inc/pop.h
  }}}
  Without the --show-inherited-props option only explicit properties are shown 
(as has always been the case):
  
  {{{
- >svn pl -vR ^/branches
+ >svn pl -vR ^/branch
- Properties on '%ROOT_URL%/branches':
+ Properties on '%ROOT_URL%/branch':
-   svn:inheritable:baz
+   svn:inheritable:foo
+     bat
+   prop:baz
      qux
+ Properties on '%ROOT_URL%/branch/src':
+   svn:inheritable:foo
+     bax
  
- >svn pg -R svn:inheritable:baz ^/
+ >svn pg -R svn:inheritable:foo ^/
+ %ROOT_URL% - bar
+ %ROOT_URL%/branch - bat
- %ROOT_URL%/branches - qux
+ %ROOT_URL%/branch/src - bax
  
- >svn pg -v svn:inheritable:baz ^/trunk
+ >svn pg -v svn:inheritable:foo ^/branch
- Properties on '%ROOT_URL%/branches':
+ Properties on '%ROOT_URL%/branch':
+   svn:inheritable:foo
+     bat
+ 
+ >svn pg svn:inheritable: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:
+ 
+ {{{
+ >svn pl -R --show-inherited-props ^/branch
+ Inheritable properties on '%ROOT_URL%':
+   svn:inheritable:foo
+ Properties on '%ROOT_URL%/branch':
+   svn:inheritable:foo
+   prop:baz
+ Properties on '%ROOT_URL%/branch/src':
+   svn:inheritable:foo
+ }}}
+ A target with no explicit mergeinfo 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
      bar
- 
- >svn pg svn:inheritable:baz ^/trunk
- 
- >
  }}}
- With the --show-inherited-props option the inherited properties on the target 
are also shown:
+ If a path inherits a property from multiple parents, all the parents are 
shown:
  
  {{{
- >svn pl -R --show-inherited-props ^/branches
- Properties on '%ROOT_URL%/branches':
-   svn:inheritable:baz
-   svn:inheritable:foo
- 
- >svn pg -v --show-inherited-props svn:inheritable:baz ^/trunk
+ >svn pg -v --show-inherited-props svn:inheritable:baz ^/branch/src/pop.c
- Properties on '%ROOT_URL%/branches':
+ Inheritable properties on '%ROOT_URL%':
    svn:inheritable:foo
      bar
+ Inheritable properties on '%ROOT_URL%/branch':
+   svn:inheritable:foo
+     bat
+ Inheritable properties on '%ROOT_URL%/branch/src':
+   svn:inheritable: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:
+ 
+ {{{
+ >svn co %ROOT_URL%/branch branch-WC
+ A    branch-WC\src
+ A    branch-WC\src\pop.c
+ A    branch-WC\inc
+ A    branch-WC\inc\pop.h
+  U   branch-WC
+ Checked out revision 11.
+ 
+ >cd branch-WC
+ 
+ >svn pg -vR svn:inheritable:foo
+ Inheritable properties on '%ROOT_URL%':
+   svn:inheritable:foo
+     bar
+ Properties on '.':
+   svn:inheritable:foo
+     bat
+ Properties on 'src':
+   svn:inheritable: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).
+ 
+ {{{#!wiki note
+ We may want to support different values for --show-inherited-props, possibly:
+ 
+ --show-inherited-props=[ 'all' (default) | 'nearest' ]
+ 
+ 'all' - Shows the target's explicit properties and all path-wise parents with 
inheritable properties.
+ 
+ 'nearest' - Shows the target's explicit properties and the nearest path-wise 
parent for any properties which are *not* explicitly set on the target.  This 
would be useful for seeing inheritable properties which follow a strict 
override model like svn:mergeinfo.
  }}}
  == API Changes ==
  Rev svn_proplist_receiver_t to svn_proplist_receiver2_t, adding the argument 
apr_hash_t *'''inherited_prop_hash'''.  Also allow the possibility that the 
existing apr_hash_t *prop_hash argument may be null:

Reply via email to