Author: rhuijben
Date: Sun Jun 5 09:17:51 2011
New Revision: 1132275
URL: http://svn.apache.org/viewvc?rev=1132275&view=rev
Log:
Document and reintroduce the (old) error behavior of svn_client_propget. While
technically undocumented at least two clients (svn and AnkhSVN) relied on this
error behavior.
* subversion/include/svn_client.h
(svn_client_propget4): Document new error code.
(svn_client_propget3): Document old error code.
* subversion/libsvn_client/deprecated.c
(svn_client_propget3): Convert new error to old error.
Modified:
subversion/trunk/subversion/include/svn_client.h
subversion/trunk/subversion/libsvn_client/deprecated.c
Modified: subversion/trunk/subversion/include/svn_client.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1132275&r1=1132274&r2=1132275&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Sun Jun 5 09:17:51 2011
@@ -4419,6 +4419,9 @@ svn_client_revprop_set(const char *propn
* If error, don't touch @a *props, otherwise @a *props is a hash table
* even if empty.
*
+ * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on
+ * unversioned nodes.
+ *
* @since New in 1.7.
*/
svn_error_t *
@@ -4439,6 +4442,9 @@ svn_client_propget4(apr_hash_t **props,
* output hash keys: keys are `<tt>char *</tt>' paths, prefixed by
* @a target, which is a working copy path or a URL.
*
+ * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4
+ * would return SVN_ERR_UNVERSIONED_RESOURCE.
+ *
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
Modified: subversion/trunk/subversion/libsvn_client/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/deprecated.c?rev=1132275&r1=1132274&r2=1132275&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_client/deprecated.c Sun Jun 5 09:17:51
2011
@@ -1629,15 +1629,24 @@ svn_client_propget3(apr_hash_t **props,
{
const char *target;
apr_hash_t *temp_props;
+ svn_error_t *err;
if (svn_path_is_url(path_or_url))
target = path_or_url;
else
SVN_ERR(svn_dirent_get_absolute(&target, path_or_url, pool));
- SVN_ERR(svn_client_propget4(&temp_props, propname, target,
- peg_revision, revision, actual_revnum,
- depth, changelists, ctx, pool, pool));
+ err = svn_client_propget4(&temp_props, propname, target,
+ peg_revision, revision, actual_revnum,
+ depth, changelists, ctx, pool, pool);
+
+ if (err && err->apr_err == SVN_ERR_UNVERSIONED_RESOURCE)
+ {
+ err->apr_err = SVN_ERR_ENTRY_NOT_FOUND;
+ return svn_error_return(err);
+ }
+ else
+ SVN_ERR(err);
if (actual_revnum
&& !svn_path_is_url(path_or_url)