~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/tests/cmdline/entries-dump.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
      SVN_ERR(svn_wc__read_entries_old(&entries, dir_abspath, pool, pool));
119
119
      lockfile_path = svn_dirent_join_many(pool, dir_path,
120
120
                                           svn_wc_get_adm_dir(pool),
121
 
                                           "lock", NULL);
 
121
                                           "lock", SVN_VA_NULL);
122
122
      SVN_ERR(svn_io_check_path(lockfile_path, &kind, pool));
123
123
      locked = (kind == svn_node_file);
124
124
    }
125
125
 
126
126
  for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
127
127
    {
128
 
      const char *key = svn__apr_hash_index_key(hi);
129
 
      const svn_wc_entry_t *entry = svn__apr_hash_index_val(hi);
 
128
      const char *key = apr_hash_this_key(hi);
 
129
      const svn_wc_entry_t *entry = apr_hash_this_val(hi);
130
130
 
131
131
      SVN_ERR_ASSERT(strcmp(key, entry->name) == 0);
132
132
 
230
230
                                   scratch_pool, scratch_pool));
231
231
  for (hi = apr_hash_first(scratch_pool, entries); hi; hi = apr_hash_next(hi))
232
232
    {
233
 
      const svn_wc_entry_t *entry = svn__apr_hash_index_val(hi);
 
233
      const svn_wc_entry_t *entry = apr_hash_this_val(hi);
234
234
      const char *local_abspath;
235
235
 
236
236
      if (entry->deleted || entry->absent || entry->kind != svn_node_dir)
287
287
  if (kind != svn_node_dir)
288
288
    return SVN_NO_ERROR;
289
289
 
 
290
  if (strcmp(local_abspath, bt->root_abspath) != 0)
 
291
    {
 
292
      svn_boolean_t is_wcroot;
 
293
      SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, bt->wc_ctx->db,
 
294
                                   local_abspath, scratch_pool));
 
295
 
 
296
      if (is_wcroot)
 
297
        return SVN_NO_ERROR; /* Report the stub, but not the data */
 
298
    }
 
299
 
290
300
  /* If LOCAL_ABSPATH a child of or equal to ROOT_ABSPATH, then display
291
301
     a relative path starting with PREFIX_PATH. */
292
302
  path = svn_dirent_skip_ancestor(bt->root_abspath, local_abspath);
304
314
}
305
315
 
306
316
static svn_error_t *
307
 
tree_dump_txn(void *baton, svn_sqlite__db_t *db, apr_pool_t *scratch_pool)
308
 
{
309
 
  struct directory_walk_baton *bt = baton;
310
 
 
311
 
  SVN_ERR(svn_wc__internal_walk_children(bt->wc_ctx->db, bt->root_abspath, FALSE,
312
 
                                         NULL, tree_dump_dir, bt,
313
 
                                         svn_depth_infinity,
314
 
                                         NULL, NULL, scratch_pool));
315
 
 
316
 
  return SVN_NO_ERROR;
317
 
}
318
 
 
319
 
static svn_error_t *
320
317
tree_dump(const char *path,
321
318
          apr_pool_t *scratch_pool)
322
319
{
341
338
  SVN_ERR(svn_wc__db_temp_borrow_sdb(&sdb, bt.wc_ctx->db, bt.root_abspath,
342
339
                                     scratch_pool));
343
340
 
344
 
  SVN_ERR(svn_sqlite__with_lock(sdb, tree_dump_txn, &bt, scratch_pool));
 
341
  SVN_SQLITE__WITH_LOCK(
 
342
      svn_wc__internal_walk_children(db, bt.root_abspath, FALSE,
 
343
                                     NULL, tree_dump_dir, &bt,
 
344
                                     svn_depth_infinity,
 
345
                                     NULL, NULL, scratch_pool),
 
346
      sdb);
345
347
 
346
348
  /* And close everything we've opened */
347
349
  SVN_ERR(svn_wc_context_destroy(bt.wc_ctx));