Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3AA0D200BB5 for ; Sun, 6 Nov 2016 13:07:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 393A6160AFC; Sun, 6 Nov 2016 12:07:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 80FFE160AD0 for ; Sun, 6 Nov 2016 13:07:03 +0100 (CET) Received: (qmail 71012 invoked by uid 500); 6 Nov 2016 12:07:02 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 71001 invoked by uid 99); 6 Nov 2016 12:07:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Nov 2016 12:07:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 171A0C14D9 for ; Sun, 6 Nov 2016 12:07:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id OFhnuZ9gD0iT for ; Sun, 6 Nov 2016 12:07:00 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 1BFAB5F39A for ; Sun, 6 Nov 2016 12:07:00 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A7F53E0652 for ; Sun, 6 Nov 2016 12:06:55 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 4100D3A00E5 for ; Sun, 6 Nov 2016 12:06:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@subversion.apache.org From: stefan2@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161106120655.4100D3A00E5@svn01-us-west.apache.org> archived-at: Sun, 06 Nov 2016 12:07:04 -0000 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));