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')