Return-Path: Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: (qmail 63912 invoked from network); 14 May 2010 14:42:29 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 May 2010 14:42:29 -0000 Received: (qmail 56622 invoked by uid 500); 14 May 2010 14:42:28 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 56607 invoked by uid 500); 14 May 2010 14:42:28 -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 56600 invoked by uid 99); 14 May 2010 14:42:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 14:42:28 +0000 X-ASF-Spam-Status: No, hits=-1811.1 required=10.0 tests=ALL_TRUSTED,AWL 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; Fri, 14 May 2010 14:42:27 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9C04323888CD; Fri, 14 May 2010 14:42:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r944296 - in /subversion/trunk/subversion: libsvn_client/commit_util.c tests/cmdline/commit_tests.py Date: Fri, 14 May 2010 14:42:07 -0000 To: commits@subversion.apache.org From: philip@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100514144207.9C04323888CD@eris.apache.org> Author: philip Date: Fri May 14 14:42:07 2010 New Revision: 944296 URL: http://svn.apache.org/viewvc?rev=944296&view=rev Log: Remove the last svn_wc_entry_t from commit_util.c * subversion/libsvn_client/commit_util.c (svn_client__harvest_committables): Remove svn_wc_entry_t, remove special case error handling for copied nodes -- they now behave like added nodes. * subversion/tests/cmdline/commit_tests.py (commit_in_dir_scheduled_for_addition): Adjust exepected error message for copied case to match added case. Modified: subversion/trunk/subversion/libsvn_client/commit_util.c subversion/trunk/subversion/tests/cmdline/commit_tests.py Modified: subversion/trunk/subversion/libsvn_client/commit_util.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=944296&r1=944295&r2=944296&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/commit_util.c (original) +++ subversion/trunk/subversion/libsvn_client/commit_util.c Fri May 14 14:42:07 2010 @@ -1013,9 +1013,9 @@ svn_client__harvest_committables(apr_has for (i = 0; i < targets->nelts; ++i) { - const svn_wc_entry_t *entry; const char *url, *target_abspath; svn_boolean_t is_added; + svn_node_kind_t kind; svn_error_t *err; svn_pool_clear(iterpool); @@ -1025,30 +1025,28 @@ svn_client__harvest_committables(apr_has APR_ARRAY_IDX(targets, i, const char *), iterpool); - /* No entry? This TARGET isn't even under version control! */ - err = svn_wc__get_entry_versioned(&entry, ctx->wc_ctx, target_abspath, - svn_node_unknown, - FALSE /* show_hidden */, - FALSE /* need_parent_stub */, - iterpool, iterpool); - /* If a target of the commit is a tree-conflicted node that - * has no entry (e.g. locally deleted), issue a proper tree- - * conflicts error instead of a "not under version control". */ - if (err && (err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)) + SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath, + FALSE, /* show_hidden */ + iterpool)); + if (kind == svn_node_none) { + /* If a target of the commit is a tree-conflicted node that + * has no entry (e.g. locally deleted), issue a proper tree- + * conflicts error instead of a "not under version control". */ const svn_wc_conflict_description2_t *conflict; svn_wc__get_tree_conflict(&conflict, ctx->wc_ctx, target_abspath, pool, iterpool); if (conflict != NULL) - { - svn_error_clear(err); - return svn_error_createf( + return svn_error_createf( SVN_ERR_WC_FOUND_CONFLICT, NULL, _("Aborting commit: '%s' remains in conflict"), svn_dirent_local_style(conflict->local_abspath, pool)); - } + else + return svn_error_createf( + SVN_ERR_ILLEGAL_TARGET, NULL, + _("'%s' is not under version control"), + svn_dirent_local_style(target_abspath, pool)); } - SVN_ERR(err); SVN_ERR(svn_wc__node_get_url(&url, ctx->wc_ctx, target_abspath, iterpool, iterpool)); @@ -1089,17 +1087,6 @@ svn_client__harvest_committables(apr_has } } - /* If this entry is marked as 'copied' but scheduled normally, then - it should be the child of something else marked for addition with - history. */ - if ((entry->copied) && (entry->schedule == svn_wc_schedule_normal)) - return svn_error_createf - (SVN_ERR_ILLEGAL_TARGET, NULL, - _("Entry for '%s' is marked as 'copied' but is not itself scheduled" - "\nfor addition. Perhaps you're committing a target that is\n" - "inside an unversioned (or not-yet-versioned) directory?"), - svn_dirent_local_style(target_abspath, pool)); - /* Handle our TARGET. */ /* Make sure this isn't inside a working copy subtree that is * marked as tree-conflicted. */ Modified: subversion/trunk/subversion/tests/cmdline/commit_tests.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/commit_tests.py?rev=944296&r1=944295&r2=944296&view=diff ============================================================================== --- subversion/trunk/subversion/tests/cmdline/commit_tests.py (original) +++ subversion/trunk/subversion/tests/cmdline/commit_tests.py Fri May 14 14:42:07 2010 @@ -1126,7 +1126,7 @@ def commit_in_dir_scheduled_for_addition svntest.actions.run_and_verify_commit(wc_dir, None, None, - "unversioned", + "not under version control", mu_path) Q_path = os.path.join(wc_dir, 'Q')