Author: philip
Date: Thu Jan 15 16:11:57 2015
New Revision: 1652157

URL: http://svn.apache.org/r1652157
Log:
Fix issue 4550, failed to run workqueue item due to earlier use of
wrong wcroot.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_init): Update wcroot cache.

* subversion/tests/cmdline/externals_tests.py
  (replace_tree_with_foreign_external): Remove XFAIL.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/tests/cmdline/externals_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=1652157&r1=1652156&r2=1652157&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Jan 15 16:11:57 2015
@@ -1561,6 +1561,7 @@ svn_wc__db_init(svn_wc__db_t *db,
   svn_wc__db_wcroot_t *wcroot;
   svn_boolean_t sqlite_exclusive = FALSE;
   apr_int32_t sqlite_timeout = 0; /* default timeout */
+  apr_hash_index_t *hi;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
   SVN_ERR_ASSERT(repos_relpath != NULL);
@@ -1593,6 +1594,16 @@ svn_wc__db_init(svn_wc__db_t *db,
   /* The WCROOT is complete. Stash it into DB.  */
   svn_hash_sets(db->dir_data, wcroot->abspath, wcroot);
 
+  /* Any previously cached children now have a new WCROOT. */
+  for (hi = apr_hash_first(scratch_pool, db->dir_data);
+       hi;
+       hi = apr_hash_next(hi))
+    {
+      const char *abspath = apr_hash_this_key(hi);
+      if (svn_dirent_is_ancestor(wcroot->abspath, abspath))
+        svn_hash_sets(db->dir_data, abspath, wcroot);
+    }
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/trunk/subversion/tests/cmdline/externals_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/externals_tests.py?rev=1652157&r1=1652156&r2=1652157&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Thu Jan 15 
16:11:57 2015
@@ -3506,7 +3506,6 @@ def copy_file_external_to_repo(sbox):
                                         expected_output, expected_disk, None)
 
 @Issue(4550)
-@XFail()
 def replace_tree_with_foreign_external(sbox):
   "replace tree with foreign external"
 


Reply via email to