FreeBSD/contrib/subversion/subversion/svnrdump/dump_editor.c
/* Make a directory baton to represent the directory at PATH (relative
 * to the EDIT_BATON).
 *
 * COPYFROM_PATH/COPYFROM_REV are the path/revision against which this
 * directory should be compared for changes. If the copyfrom
 * information is valid, the directory will be compared against its
 * copy source.
 *
 * PB is the directory baton of this directory's parent, or NULL if
 * this is the top-level directory of the edit.
 *
 * Perform all allocations in POOL.  */
Make a directory baton to represent the directory at PATH (relative
to the EDIT_BATON).

COPYFROM_PATH/COPYFROM_REV are the path/revision against which this
directory should be compared for changes. If the copyfrom
information is valid, the directory will be compared against its
copy source.

PB is the directory baton of this directory's parent, or NULL if
this is the top-level directory of the edit.

Perform all allocations in POOL.
Make a directory baton to represent the directory at PATH ( relative to the EDIT_BATON ) . COPYFROM_PATH / COPYFROM_REV are the path / revision against which this directory should be compared for changes . If the copyfrom information is valid the directory will be compared against its copy source . PB is the directory baton of this directory ' s parent or NULL if this is the top - level directory of the edit . Perform all allocations in POOL .
static struct dir_baton *
make_dir_baton(const char *path,
               const char *copyfrom_path,
               svn_revnum_t copyfrom_rev,
               void *edit_baton,
               struct dir_baton *pb,
               apr_pool_t *pool)
{
  struct dump_edit_baton *eb = edit_baton;
  struct dir_baton *new_db = apr_pcalloc(pool, sizeof(*new_db));
  const char *repos_relpath;
  if (pb)
    repos_relpath = svn_relpath_canonicalize(path, pool);
  else
    repos_relpath = "";
  if (copyfrom_path)
    copyfrom_path = svn_relpath_canonicalize(copyfrom_path, pool);
  new_db->eb = eb;
  new_db->pool = pool;
  new_db->repos_relpath = repos_relpath;
  new_db->copyfrom_path = copyfrom_path
                            ? svn_relpath_canonicalize(copyfrom_path, pool)
                            : NULL;
  new_db->copyfrom_rev = copyfrom_rev;
  new_db->headers = NULL;
  new_db->props = apr_hash_make(pool);
  new_db->deleted_props = apr_hash_make(pool);
  new_db->deleted_entries = apr_hash_make(pool);
  return new_db;
}
static struct dir_baton * make_dir_baton ( const char * path , const char * copyfrom_path , svn_revnum_t copyfrom_rev , void * edit_baton , struct dir_baton * pb , apr_pool_t * pool ) { struct dump_edit_baton * eb = edit_baton ; struct dir_baton * new_db = apr_pcalloc ( pool , sizeof ( * new_db ) ) ; const char * repos_relpath ; if ( pb ) repos_relpath = svn_relpath_canonicalize ( path , pool ) ; else repos_relpath = " " ; if ( copyfrom_path ) copyfrom_path = svn_relpath_canonicalize ( copyfrom_path , pool ) ; new_db -> eb = eb ; new_db -> pool = pool ; new_db -> repos_relpath = repos_relpath ; new_db -> copyfrom_path = copyfrom_path ? svn_relpath_canonicalize ( copyfrom_path , pool ) : NULL ; new_db -> copyfrom_rev = copyfrom_rev ; new_db -> headers = NULL ; new_db -> props = apr_hash_make ( pool ) ; new_db -> deleted_props = apr_hash_make ( pool ) ; new_db -> deleted_entries = apr_hash_make ( pool ) ; return new_db ; }
Make a directory baton to represent the directory at PATH (relative
 to the EDIT_BATON).
Make a directory baton to represent the directory at PATH ( relative to the EDIT_BATON ) .
/* Construct the full path of this node. */ /* Strip leading slash from copyfrom_path so that the path is
     canonical and svn_relpath_join can be used */