Author: philip
Date: Thu May 10 18:25:47 2012
New Revision: 1336824
URL: http://svn.apache.org/viewvc?rev=1336824&view=rev
Log:
Fix recursive revert of actual-only nodes.
* subversion/libsvn_wc/wc_db.c
(op_revert_recursive_txn): Really get the number of rows deleted.
* subversion/tests/cmdline/tree_conflict_tests.py
(actual_only_node_behaviour): Extend.
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db.c
subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1336824&r1=1336823&r2=1336824&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu May 10 18:25:47 2012
@@ -5498,13 +5498,12 @@ op_revert_recursive_txn(void *baton,
STMT_DELETE_ACTUAL_NODE_RECURSIVE));
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
local_relpath));
- SVN_ERR(svn_sqlite__step(&affected_rows, stmt));
+ SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
if (affected_rows)
return SVN_NO_ERROR; /* actual-only revert */
- return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND,
- svn_sqlite__reset(stmt),
+ return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
_("The node '%s' was not found."),
path_for_error_message(wcroot,
local_relpath,
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=1336824&r1=1336823&r2=1336824&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py Thu May 10
18:25:47 2012
@@ -1343,6 +1343,18 @@ def actual_only_node_behaviour(sbox):
svntest.main.run_svn(None, "merge", '-c', '4', A_copy_url,
os.path.join(wc_dir, 'A'))
+ # revert
+ expected_stdout = "Reverted.*foo.*"
+ expected_stderr = []
+ run_and_verify_svn(None, expected_stdout, expected_stderr,
+ "revert", "-R", foo_path)
+
+ # revert the entire working copy and repeat the merge so we can test
+ # more commands
+ svntest.main.run_svn(None, "revert", "-R", wc_dir)
+ svntest.main.run_svn(None, "merge", '-c', '4', A_copy_url,
+ os.path.join(wc_dir, 'A'))
+
# status (stat, st)
expected_status = wc.State(foo_path, {
'' : Item(status='! ', treeconflict='C'),