You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/05/24 20:23:10 UTC
svn commit: r1127195 - in /subversion/trunk/subversion:
libsvn_client/checkout.c tests/cmdline/tree_conflict_tests.py
Author: stsp
Date: Tue May 24 18:23:10 2011
New Revision: 1127195
URL: http://svn.apache.org/viewvc?rev=1127195&view=rev
Log:
As part of issue #3779, "actual-only nodes need regression tests",
make checkout refuse to create a new working copy at the path of a
tree-conflicted item.
* subversion/libsvn_client/checkout.c
(svn_client__checkout_internal): If there is no node on disk, also make
sure that there is no known tree conflict victim at the path.
* subversion/tests/cmdline/tree_conflict_tests.py
(actual_only_node_behaviour): Adjust check for behaviour of 'checkout'.
Modified:
subversion/trunk/subversion/libsvn_client/checkout.c
subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py
Modified: subversion/trunk/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/checkout.c?rev=1127195&r1=1127194&r2=1127195&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/checkout.c (original)
+++ subversion/trunk/subversion/libsvn_client/checkout.c Tue May 24 18:23:10 2011
@@ -168,6 +168,19 @@ svn_client__checkout_internal(svn_revnum
if (kind == svn_node_none)
{
+ svn_boolean_t tree_conflicted;
+
+ /* Make sure we're not checking out into a path that's missing on
+ * disk but is conflicted in some other working copy. */
+ err = svn_wc_conflicted_p3(NULL, NULL, &tree_conflicted,
+ ctx->wc_ctx, local_abspath, pool);
+ if (err)
+ svn_error_clear(err);
+ else if (tree_conflicted)
+ return svn_error_createf(SVN_ERR_WC_FOUND_CONFLICT, NULL,
+ _("'%s' is an existing item in conflict"),
+ svn_dirent_local_style(local_abspath, pool));
+
/* Bootstrap: create an incomplete working-copy root dir. Its
entries file should only have an entry for THIS_DIR with a
URL, revnum, and an 'incomplete' flag. */
Modified: subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py?rev=1127195&r1=1127194&r2=1127195&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py Tue May 24 18:23:10 2011
@@ -1172,14 +1172,10 @@ def actual_only_node_behaviour(sbox):
"changelist", "my_changelist", foo_path)
# checkout (co)
- ### this does not error out -- needs review
expected_stdout = None
- expected_stderr = []
+ expected_stderr = ".*foo.*is an existing item in conflict.*"
run_and_verify_svn(None, expected_stdout, expected_stderr,
"checkout", A_copy_url, foo_path)
- ### for now, ignore the fact that checkout succeeds and remove the nested
- ### working copy so we can test more commands
- shutil.rmtree(foo_path)
# cleanup
expected_stdout = None