Index: subversion/include/private/svn_wc_private.h =================================================================== --- subversion/include/private/svn_wc_private.h (revision 1292379) +++ subversion/include/private/svn_wc_private.h (working copy) @@ -263,6 +263,15 @@ apr_pool_t *result_pool, apr_pool_t *scratch_pool); +/* Close the DB for LOCAL_ABSPATH. Perform temporary allocations in + SCRATCH_POOL. + + Wraps svn_wc__db_drop_root(). */ +svn_error_t * +svn_wc__close_db(const char *external_abspath, + svn_wc_context_t *wc_ctx, + apr_pool_t *scratch_pool); + /** Set @a *tree_conflict to a newly allocated @c * svn_wc_conflict_description_t structure describing the tree * conflict state of @a victim_abspath, or to @c NULL if @a victim_abspath Index: subversion/libsvn_client/externals.c =================================================================== --- subversion/libsvn_client/externals.c (revision 1292379) +++ subversion/libsvn_client/externals.c (working copy) @@ -299,6 +299,9 @@ external_peg_rev, external_rev, pool)); + /* Issue #4123: We don't need to keep the newly checked out external's + DB open. */ + SVN_ERR(svn_wc__close_db(local_abspath, ctx->wc_ctx, pool)); } return SVN_NO_ERROR; Index: subversion/libsvn_wc/externals.c =================================================================== --- subversion/libsvn_wc/externals.c (revision 1292379) +++ subversion/libsvn_wc/externals.c (working copy) @@ -1363,6 +1363,16 @@ } } +svn_error_t * +svn_wc__close_db(const char *external_abspath, + svn_wc_context_t *wc_ctx, + apr_pool_t *scratch_pool) +{ + SVN_ERR(svn_wc__db_drop_root(wc_ctx->db, external_abspath, + scratch_pool)); + return SVN_NO_ERROR; +} + /* Return the scheme of @a uri in @a scheme allocated from @a pool. If @a uri does not appear to be a valid URI, then @a scheme will not be updated. */