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 2014/02/25 20:26:50 UTC
svn commit: r1571795 - in /subversion/trunk/subversion:
libsvn_client/commit_util.c tests/cmdline/commit_tests.py
Author: rhuijben
Date: Tue Feb 25 19:26:50 2014
New Revision: 1571795
URL: http://svn.apache.org/r1571795
Log:
Following up on r1571747 and r1571787, resolve an often reported assertion
on the user list by properly calculating a url (r1571787) and providing a
proper error when an added ancestor is not part of a commit.
* subversion/libsvn_client/commit_util.c
(harvest_status_callback): Also check for dangling nodes when the node
specifies the delete of a working node.
* subversion/tests/cmdline/commit_tests.py
(commit_deep_deleted): Remove XFail and extend test.
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=1571795&r1=1571794&r2=1571795&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Tue Feb 25 19:26:50 2014
@@ -916,7 +916,7 @@ harvest_status_callback(void *status_bat
if (matches_changelists
&& (is_harvest_root || baton->changelists)
&& state_flags
- && is_added
+ && (is_added || (is_deleted && is_op_root && status->copied))
&& baton->danglers)
{
/* If a node is added, its parent must exist in the repository at the
Modified: subversion/trunk/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/commit_tests.py?rev=1571795&r1=1571794&r2=1571795&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/commit_tests.py Tue Feb 25 19:26:50 2014
@@ -3015,20 +3015,64 @@ def commit_cp_with_deep_delete(sbox):
None,
wc_dir)
-@XFail()
def commit_deep_deleted(sbox):
"try to commit a deep descendant of a deleted node"
sbox.build()
sbox.simple_move('A', 'AA')
- sbox.simple_rm('AA/D')
+ sbox.simple_propset('k', 'v', 'AA/D/G')
+
+ # Committing some added descendant returns a proper error
+ expected_err = ('svn: E200009: \'%s\' is not known to exist in the ' +
+ 'repository and is not part of the commit, yet its ' +
+ 'child \'%s\' is part of the commit') % (
+ re.escape(os.path.abspath(sbox.ospath('AA'))),
+ re.escape(os.path.abspath(sbox.ospath('AA/D/G'))))
+
+ svntest.actions.run_and_verify_commit(sbox.wc_dir,
+ None,
+ None,
+ expected_err,
+ sbox.ospath('AA/D/G'))
+
+ sbox.simple_propdel('k', 'AA/D/G')
+ sbox.simple_rm('AA/D/G')
+
+ # But a delete fails..
+ # This used to trigger an assertion in Subversion 1.8.0-1.8.8, because
+ # the status walker couldn't find the repository path for AA/D/G
svntest.actions.run_and_verify_commit(sbox.wc_dir,
None,
None,
+ expected_err,
+ sbox.ospath('AA/D/G'))
+
+ # And now commit like how a GUI client would do it, but forgetting the move
+ expected_err = ('svn: E200009: Cannot commit \'%s\' because it was moved ' +
+ 'from \'%s\' which is not part of the commit; both sides ' +
+ 'of the move must be committed together') % (
+ re.escape(os.path.abspath(sbox.ospath('AA'))),
+ re.escape(os.path.abspath(sbox.ospath('A'))))
+ svntest.actions.run_and_verify_commit(sbox.wc_dir,
+ None,
+ None,
+ expected_err,
+ '--depth', 'empty',
+ sbox.ospath('AA/D/G'),
+ sbox.ospath('AA'))
+
+
+ # And now how it works
+ svntest.actions.run_and_verify_commit(sbox.wc_dir,
+ None,
None,
- sbox.ospath('AA/D'))
+ [],
+ '--depth', 'empty',
+ sbox.ospath('AA/D/G'),
+ sbox.ospath('AA'),
+ sbox.ospath('A'))
########################################################################
# Run the tests