Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 064EB10756 for ; Thu, 10 Apr 2014 10:14:55 +0000 (UTC) Received: (qmail 30639 invoked by uid 500); 10 Apr 2014 10:14:54 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 30533 invoked by uid 500); 10 Apr 2014 10:14:51 -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 30503 invoked by uid 99); 10 Apr 2014 10:14:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Apr 2014 10:14:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Apr 2014 10:14:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E70D12388868; Thu, 10 Apr 2014 10:14:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1586255 - in /subversion/trunk/subversion: libsvn_client/prop_commands.c tests/cmdline/prop_tests.py Date: Thu, 10 Apr 2014 10:14:23 -0000 To: commits@subversion.apache.org From: rhuijben@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140410101423.E70D12388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhuijben Date: Thu Apr 10 10:14:23 2014 New Revision: 1586255 URL: http://svn.apache.org/r1586255 Log: Replace assertions triggered in svn_dirent_get_absolute() triggered by $ svn pl -r PREV https://svn.apache.org/repos/asf $ svn pg Q -r PREV https://svn.apache.org/repos/asf and $ tortoiseproc /command:properties /path:https://svn.apache.org/repos/asf (which tries to obtain the WORKING properties) with a proper error. * subversion/libsvn_client/prop_commands.c (svn_client_propget5): Don't assert when we encounter a url. Avoid second conversion to absolute path. (get_remote_props): Don't assert when we encounter a url. * subversion/tests/cmdline/prop_tests.py (wc_propop_on_url): New function. (test_list): Add wc_propop_on_url. Found by: Baybora Aksoy CollabNet QA Modified: subversion/trunk/subversion/libsvn_client/prop_commands.c subversion/trunk/subversion/tests/cmdline/prop_tests.py Modified: subversion/trunk/subversion/libsvn_client/prop_commands.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/prop_commands.c?rev=1586255&r1=1586254&r2=1586255&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/prop_commands.c (original) +++ subversion/trunk/subversion/libsvn_client/prop_commands.c Thu Apr 10 10:14:23 2014 @@ -882,8 +882,14 @@ svn_client_propget5(apr_hash_t **props, const char *repos_root_url; const char *local_abspath; - SVN_ERR(svn_dirent_get_absolute(&local_abspath, target, - scratch_pool)); + /* Avoid assertion on the next line when somebody accidentally asks for + a working copy revision on a URL */ + if (svn_path_is_url(target)) + return svn_error_create(SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED, + NULL, NULL); + + SVN_ERR_ASSERT(svn_dirent_is_absolute(target)); + local_abspath = target; if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind)) { @@ -1280,6 +1286,12 @@ get_remote_props(const char *path_or_url const char *local_abspath; svn_boolean_t is_copy; + /* Avoid assertion on the next line when somebody accidentally asks for + a working copy revision on a URL */ + if (svn_path_is_url(path_or_url)) + return svn_error_create(SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED, + NULL, NULL); + SVN_ERR(svn_dirent_get_absolute(&local_abspath, path_or_url, scratch_pool)); Modified: subversion/trunk/subversion/tests/cmdline/prop_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/prop_tests.py?rev=1586255&r1=1586254&r2=1586255&view=diff ============================================================================== --- subversion/trunk/subversion/tests/cmdline/prop_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/prop_tests.py Thu Apr 10 10:14:23 2014 @@ -2746,6 +2746,20 @@ def iprops_list_abspath(sbox): '--show-inherited-props', '-v', os.path.abspath(sbox.ospath(''))) +def wc_propop_on_url(sbox): + "perform wc specific operations on url" + + sbox.build(create_wc = False) + + svntest.actions.run_and_verify_svn(None, None, '.*E195000:.*path', + 'pl', '-r', 'PREV', + sbox.repo_url) + + svntest.actions.run_and_verify_svn(None, None, '.*E195000:.*path', + 'pg', 'my:Q', '-r', 'PREV', + sbox.repo_url) + + ######################################################################## # Run the tests @@ -2794,6 +2808,7 @@ test_list = [ None, xml_unsafe_author, dir_prop_conflict_details, iprops_list_abspath, + wc_propop_on_url, ] if __name__ == '__main__':