You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2013/02/15 18:03:39 UTC

svn commit: r1446689 - in /subversion/trunk/subversion/tests: cmdline/move_tests.py libsvn_wc/op-depth-test.c

Author: philip
Date: Fri Feb 15 17:03:38 2013
New Revision: 1446689

URL: http://svn.apache.org/r1446689
Log:
Add test to show failure to clear moved-here for moved-away-delete conflicts.

* subversion/tests/libsvn_wc/op-depth-test.c
  (move_away_delete_update): New test.
  (test_funcs): Add new test as XFAIL.

Modified:
    subversion/trunk/subversion/tests/cmdline/move_tests.py
    subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c

Modified: subversion/trunk/subversion/tests/cmdline/move_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/move_tests.py?rev=1446689&r1=1446688&r2=1446689&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/move_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/move_tests.py Fri Feb 15 17:03:38 2013
@@ -180,6 +180,8 @@ def move_file_test(sbox, source, dest, m
         resolve['error'] = [] 
       if 'revert_paths' in resolve:
         revert_paths = resolve['revert_paths']
+      if isinstance(resolve['error'], svntest.verify.RegexOutput):
+        import pdb;pdb.set_trace()
       svntest.actions.run_and_verify_svn('Resolve modification to source of move',
                                           resolve['output'], resolve['error'],
                                           'resolve', '--accept', resolve_accept,

Modified: subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c?rev=1446689&r1=1446688&r2=1446689&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Fri Feb 15 17:03:38 2013
@@ -6674,6 +6674,47 @@ finite_move_update_bump(const svn_test_o
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+move_away_delete_update(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  SVN_ERR(svn_test__sandbox_create(&b, "move_away_delete_update",
+                                   opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "P"));
+  SVN_ERR(sbox_wc_mkdir(&b, "P/Q"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
+  SVN_ERR(sbox_wc_delete(&b, "P/Q"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A/B/C", "C2"));
+  SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+  SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+                          svn_wc_conflict_choose_merged));
+  SVN_ERR(sbox_wc_resolve(&b, "P/Q", svn_depth_empty,
+                          svn_wc_conflict_choose_merged));
+  /* Either update or resolve should clear the moved-here flags */
+  {
+    nodes_row_t nodes[] = {
+      {0, "",   "normal", 2, ""},
+      {0, "A",  "normal", 2, "A"},
+      {0, "P",  "normal", 2, "P"},
+      {1, "C2", "normal", 1, "A/B/C"},
+      {1, "Q2", "normal", 1, "P/Q"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
 
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
@@ -6801,5 +6842,7 @@ struct svn_test_descriptor_t test_funcs[
                         "commit_moved_away_descendant"),
     SVN_TEST_OPTS_PASS(finite_move_update_bump,
                        "finite_move_update_bump"),
+    SVN_TEST_OPTS_XFAIL(move_away_delete_update,
+                        "move_away_delete_update"),
     SVN_TEST_NULL
   };