subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1768311 - in /subversion/trunk/subversion: include/svn_ra.h libsvn_client/list.c libsvn_ra/ra_loader.c
Date Sun, 06 Nov 2016 12:06:54 GMT
Author: stefan2
Date: Sun Nov  6 12:06:54 2016
New Revision: 1768311

URL: http://svn.apache.org/viewvc?rev=1768311&view=rev
Log:
Use the correct error code to signal that a server does not implement
svn_ra_list.

* subversion/include/svn_ra.h
  (svn_ra_list): Explicitly document the error code that can be expected.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_list): Return "feature not supported" instead of "entire protocol
                 scheme not supported".

* subversion/libsvn_client/list.c
  (list_internal): We now only need to test for one error condition.

Found by: danielsh

Modified:
    subversion/trunk/subversion/include/svn_ra.h
    subversion/trunk/subversion/libsvn_client/list.c
    subversion/trunk/subversion/libsvn_ra/ra_loader.c

Modified: subversion/trunk/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_ra.h?rev=1768311&r1=1768310&r2=1768311&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_ra.h (original)
+++ subversion/trunk/subversion/include/svn_ra.h Sun Nov  6 12:06:54 2016
@@ -1173,6 +1173,10 @@ typedef svn_error_t *(* svn_ra_dirent_re
  * @a path must point to a directory and @a depth must be at least
  * @c svn_depth_empty.
  *
+ * If the server doesn't support the 'list' command, return
+ * @c SVN_ERR_UNSUPPORTED_FEATURE in preference to any other error that
+ * might otherwise be returned.
+ *
  * Use @a scratch_pool for temporary memory allocation.
  *
  * @since New in 1.10.

Modified: subversion/trunk/subversion/libsvn_client/list.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/list.c?rev=1768311&r1=1768310&r2=1768311&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/list.c (original)
+++ subversion/trunk/subversion/libsvn_client/list.c Sun Nov  6 12:06:54 2016
@@ -378,8 +378,7 @@ list_internal(const char *path_or_url,
       err = svn_ra_list(ra_session, "", loc->rev, patterns, depth,
                         dirent_fields, list_receiver, &receiver_baton, pool);
 
-      if (   svn_error_find_cause(err, SVN_ERR_UNSUPPORTED_FEATURE)
-          || svn_error_find_cause(err, SVN_ERR_RA_NOT_IMPLEMENTED))
+      if (svn_error_find_cause(err, SVN_ERR_UNSUPPORTED_FEATURE))
         svn_error_clear(err);
       else
         return svn_error_trace(err);

Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.c?rev=1768311&r1=1768310&r2=1768311&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.c Sun Nov  6 12:06:54 2016
@@ -658,7 +658,7 @@ svn_ra_list(svn_ra_session_t *session,
 {
   SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
   if (!session->vtable->list)
-    return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL);
+    return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL, NULL);
 
   SVN_ERR(svn_ra__assert_capable_server(session, SVN_RA_CAPABILITY_LIST,
                                         NULL, scratch_pool));



Mime
View raw message