You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/01/17 16:11:07 UTC
svn commit: r1434708 - in /subversion/trunk/subversion:
libsvn_wc/externals.c tests/cmdline/externals_tests.py
Author: rhuijben
Date: Thu Jan 17 15:11:06 2013
New Revision: 1434708
URL: http://svn.apache.org/viewvc?rev=1434708&view=rev
Log:
When adding a new file external, there should be no existing unversioned file.
Perform a shadowed update if there is one to avoid overwriting an existing
file.
* subversion/libsvn_wc/externals.c
(edit_baton): Add boolean.
(add_file): Mark added.
(close_file): Don't just take over existing files, or failing while trying.
* subversion/tests/cmdline/externals_tests.py
(move_with_file_externals): Remove XFail marker and some unneeded whitespace.
Modified:
subversion/trunk/subversion/libsvn_wc/externals.c
subversion/trunk/subversion/tests/cmdline/externals_tests.py
Modified: subversion/trunk/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/externals.c?rev=1434708&r1=1434707&r2=1434708&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/externals.c (original)
+++ subversion/trunk/subversion/libsvn_wc/externals.c Thu Jan 17 15:11:06 2013
@@ -414,6 +414,9 @@ struct edit_baton
svn_revnum_t recorded_peg_revision;
svn_revnum_t recorded_revision;
+ /* Introducing a new file external */
+ svn_boolean_t added;
+
svn_wc_conflict_resolver_func2_t conflict_func;
void *conflict_baton;
svn_cancel_func_t cancel_func;
@@ -491,6 +494,7 @@ add_file(const char *path,
*file_baton = eb;
eb->original_revision = SVN_INVALID_REVNUM;
+ eb->added = TRUE;
return SVN_NO_ERROR;
}
@@ -773,7 +777,8 @@ close_file(void *file_baton,
install_pristine = TRUE;
content_state = svn_wc_notify_state_changed;
}
- else if (disk_kind != svn_node_file)
+ else if (disk_kind != svn_node_file
+ || eb->added && disk_kind == svn_node_file)
{
/* The node is obstructed; we just change the DB */
obstructed = TRUE;
@@ -911,7 +916,7 @@ close_file(void *file_baton,
svn_wc_notify_action_t action;
svn_wc_notify_t *notify;
- if (SVN_IS_VALID_REVNUM(eb->original_revision))
+ if (!eb->added)
action = obstructed ? svn_wc_notify_update_shadowed_update
: svn_wc_notify_update_update;
else
Modified: subversion/trunk/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/externals_tests.py?rev=1434708&r1=1434707&r2=1434708&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Thu Jan 17 15:11:06 2013
@@ -2992,8 +2992,7 @@ def list_include_externals(sbox):
exit_code, stdout, stderr = svntest.actions.run_and_verify_svn2(
"OUTPUT", expected_stdout, [], 0, 'ls', '--include-externals', C_url)
-@XFail()
-@Issue(4293)
+@Issue(4293)
def move_with_file_externals(sbox):
"move with file externals"