You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2012/11/29 23:56:00 UTC

[PATCH] svn property name test functions

Nothing terribly exciting to see here.  I'm posting these patches just in case someone wants to comment or pick them up, because I won't be able to finish them today, or if Brane wants to take note because it's relevant to the property name testing in his recent prop-name spell-check code.

The attached 'property-name-test-functions-1.patch' creates some public functions:


 * subversion/include/svn_props.h
  (svn_prop_is_known_svn_rev_prop, svn_prop_is_known_svn_node_prop,
   svn_prop_is_known_svn_file_prop, svn_prop_is_known_svn_dir_prop): New
    functions.

and uses them in a small number of places that were doing those sorts of test in-line.

As I have written in the log msg, we might want to expose the arrays as well (or possibly instead of) the functions.


The attached 'propdel-suppress-nonexistent-1.patch' demonstrates what I was trying to do, which is make the following warnings go away:

$ svn pd svn:ignore -R contrib/cgi/
Attempting to delete nonexistent property 'svn:ignore' on 'contrib/cgi'
Attempting to delete nonexistent property 'svn:ignore' on 'contrib/cgi/...svn.cgi'
Attempting to delete nonexistent property 'svn:ignore' on 'contrib/cgi/...README'
Attempting to delete nonexistent property 'svn:ignore' on 'contrib/cgi/...log.cgi'

I want the warnings to appear only for the node kinds where that property might be expected, not for all of the nodes.

My current approach of suppressing the notifications seems rather wrong.  As noted in the log message in the patch, I want tohave a look at what 'propset' does, as maybe we should be avoiding trying to delete it from the wrong node kind rather than trying and then suppressing the notification.

Or, perhaps the best solution is a middle way: try to delete from all nodes (I suppose we think we should do this "just in case it's there"), but don't send this notification when it's the wrong node kind.

- Julian




--
Certified & Supported Apache Subversion Downloads: http://www.wandisco.com/subversion/download

Re: [PATCH] svn property name test functions

Posted by Julian Foad <ju...@btopenworld.com>.
I (Julian Foad) wrote:

> Nothing terribly exciting to see here.  I'm posting these patches just in 
> case someone wants to comment or pick them up, because I won't be able to 
> finish them today, or if Brane wants to take note because it's relevant to 
> the property name testing in his recent prop-name spell-check code.
> 
> The attached 'property-name-test-functions-1.patch' creates some public 
> functions:
> 
>  * subversion/include/svn_props.h
>   (svn_prop_is_known_svn_rev_prop, svn_prop_is_known_svn_node_prop,
>    svn_prop_is_known_svn_file_prop, svn_prop_is_known_svn_dir_prop): New
>     functions.
> 
> and uses them in a small number of places that were doing those sorts of test 
> in-line.

I decided to commit this patch (but not the one described below).  r1415456.

> As I have written in the log msg, we might want to expose the arrays as well (or 
> possibly instead of) the functions.

I didn't write that in the commit log msg, only in the previously attached patch file.

- Julian


> The attached 'propdel-suppress-nonexistent-1.patch' demonstrates what I 
> was trying to do, which is make the following warnings go away:
> 
> $ svn pd svn:ignore -R contrib/cgi/
> Attempting to delete nonexistent property 'svn:ignore' on 
> 'contrib/cgi'
> Attempting to delete nonexistent property 'svn:ignore' on 
> 'contrib/cgi/...svn.cgi'
> Attempting to delete nonexistent property 'svn:ignore' on 
> 'contrib/cgi/...README'
> Attempting to delete nonexistent property 'svn:ignore' on 
> 'contrib/cgi/...log.cgi'
> 
> I want the warnings to appear only for the node kinds where that property might 
> be expected, not for all of the nodes.
> 
> My current approach of suppressing the notifications seems rather wrong.  As 
> noted in the log message in the patch, I want tohave a look at what 
> 'propset' does, as maybe we should be avoiding trying to delete it from 
> the wrong node kind rather than trying and then suppressing the notification.
> 
> Or, perhaps the best solution is a middle way: try to delete from all nodes (I 
> suppose we think we should do this "just in case it's there"), but 
> don't send this notification when it's the wrong node kind.