diff options
Diffstat (limited to 'subversion/tests/cmdline/entries-dump.c')
-rw-r--r-- | subversion/tests/cmdline/entries-dump.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/subversion/tests/cmdline/entries-dump.c b/subversion/tests/cmdline/entries-dump.c index e4edc61..cfdb1e0 100644 --- a/subversion/tests/cmdline/entries-dump.c +++ b/subversion/tests/cmdline/entries-dump.c @@ -118,15 +118,15 @@ entries_dump(const char *dir_path, svn_wc_adm_access_t *related, apr_pool_t *poo SVN_ERR(svn_wc__read_entries_old(&entries, dir_abspath, pool, pool)); lockfile_path = svn_dirent_join_many(pool, dir_path, svn_wc_get_adm_dir(pool), - "lock", NULL); + "lock", SVN_VA_NULL); SVN_ERR(svn_io_check_path(lockfile_path, &kind, pool)); locked = (kind == svn_node_file); } for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi)) { - const char *key = svn__apr_hash_index_key(hi); - const svn_wc_entry_t *entry = svn__apr_hash_index_val(hi); + const char *key = apr_hash_this_key(hi); + const svn_wc_entry_t *entry = apr_hash_this_val(hi); SVN_ERR_ASSERT(strcmp(key, entry->name) == 0); @@ -230,7 +230,7 @@ directory_dump_old(struct directory_walk_baton *bt, scratch_pool, scratch_pool)); for (hi = apr_hash_first(scratch_pool, entries); hi; hi = apr_hash_next(hi)) { - const svn_wc_entry_t *entry = svn__apr_hash_index_val(hi); + const svn_wc_entry_t *entry = apr_hash_this_val(hi); const char *local_abspath; if (entry->deleted || entry->absent || entry->kind != svn_node_dir) @@ -287,6 +287,16 @@ tree_dump_dir(const char *local_abspath, if (kind != svn_node_dir) return SVN_NO_ERROR; + if (strcmp(local_abspath, bt->root_abspath) != 0) + { + svn_boolean_t is_wcroot; + SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, bt->wc_ctx->db, + local_abspath, scratch_pool)); + + if (is_wcroot) + return SVN_NO_ERROR; /* Report the stub, but not the data */ + } + /* If LOCAL_ABSPATH a child of or equal to ROOT_ABSPATH, then display a relative path starting with PREFIX_PATH. */ path = svn_dirent_skip_ancestor(bt->root_abspath, local_abspath); @@ -304,19 +314,6 @@ tree_dump_dir(const char *local_abspath, } static svn_error_t * -tree_dump_txn(void *baton, svn_sqlite__db_t *db, apr_pool_t *scratch_pool) -{ - struct directory_walk_baton *bt = baton; - - SVN_ERR(svn_wc__internal_walk_children(bt->wc_ctx->db, bt->root_abspath, FALSE, - NULL, tree_dump_dir, bt, - svn_depth_infinity, - NULL, NULL, scratch_pool)); - - return SVN_NO_ERROR; -} - -static svn_error_t * tree_dump(const char *path, apr_pool_t *scratch_pool) { @@ -341,7 +338,12 @@ tree_dump(const char *path, SVN_ERR(svn_wc__db_temp_borrow_sdb(&sdb, bt.wc_ctx->db, bt.root_abspath, scratch_pool)); - SVN_ERR(svn_sqlite__with_lock(sdb, tree_dump_txn, &bt, scratch_pool)); + SVN_SQLITE__WITH_LOCK( + svn_wc__internal_walk_children(db, bt.root_abspath, FALSE, + NULL, tree_dump_dir, &bt, + svn_depth_infinity, + NULL, NULL, scratch_pool), + sdb); /* And close everything we've opened */ SVN_ERR(svn_wc_context_destroy(bt.wc_ctx)); |