Author: philip
Date: Thu Feb 21 19:51:10 2013
New Revision: 1448784

URL: http://svn.apache.org/r1448784
Log:
Fix issue 4111, update under add with not-present parent.

* subversion/libsvn_wc/node.c
  (svn_wc__node_get_base): Ignore not-present nodes.

* subversion/tests/cmdline/update_tests.py
  (update_child_below_add): Tweak status, remove XFAIL.

* subversion/tests/libsvn_wc/op-depth-test.c
  (test_funcs): Mark update_child_under_add PASS.

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

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1448784&r1=1448783&r2=1448784&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Thu Feb 21 19:51:10 2013
@@ -653,15 +653,17 @@ svn_wc__node_get_base(svn_revnum_t *revi
 {
   svn_error_t *err;
   svn_wc__db_lock_t *lock;
+  svn_wc__db_status_t status;
 
-  err = svn_wc__db_base_get_info(NULL, NULL, revision, repos_relpath,
+  err = svn_wc__db_base_get_info(&status, NULL, revision, repos_relpath,
                                  repos_root_url, repos_uuid, NULL,
                                  NULL, NULL, NULL, NULL, NULL,
                                  lock_token ? &lock : NULL,
                                  NULL, NULL, NULL,
                                  wc_ctx->db, local_abspath,
                                  result_pool, scratch_pool);
-  if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+  if ((err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+      || (!err && status == svn_wc__db_status_not_present))
     {
       svn_error_clear(err);
       if (revision)

Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/update_tests.py?rev=1448784&r1=1448783&r2=1448784&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/update_tests.py Thu Feb 21 
19:51:10 2013
@@ -6736,7 +6736,6 @@ def bump_below_tree_conflict(sbox):
                                         sbox.ospath('A/D/G'))
 
 @Issues(4111)
-@XFail()
 def update_child_below_add(sbox):
   "update child below added tree"
 
@@ -6765,6 +6764,11 @@ def update_child_below_add(sbox):
   sbox.simple_mkdir('A/B/E')
   sbox.simple_add_text('the new alpha', 'A/B/E/alpha')
 
+  expected_status.add({
+      'A/B'         : Item(status='A ', wc_rev='-'),
+      'A/B/E'       : Item(status='A ', wc_rev='-'),
+      'A/B/E/alpha' : Item(status='A ', wc_rev='-'),
+  })
   # Update should still skip A/B/E
   svntest.actions.run_and_verify_update(wc_dir,
                                         expected_output,

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=1448784&r1=1448783&r2=1448784&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Thu Feb 21 
19:51:10 2013
@@ -7121,7 +7121,7 @@ struct svn_test_descriptor_t test_funcs[
                        "move_away_delete_update"),
     SVN_TEST_OPTS_PASS(move_not_present_variants,
                        "move_not_present_variants"),
-    SVN_TEST_OPTS_XFAIL(update_child_under_add,
-                        "update_child_under_add (issue 4111)"),
+    SVN_TEST_OPTS_PASS(update_child_under_add,
+                       "update_child_under_add (issue 4111)"),
     SVN_TEST_NULL
   };


Reply via email to