FreeBSD/contrib/subversion/subversion/libsvn_repos/dump.c
/* Make a directory baton to represent the directory was path
   (relative to EDIT_BATON's path) is PATH.

   CMP_PATH/CMP_REV are the path/revision against which this directory
   should be compared for changes.  If either is omitted (NULL for the
   path, SVN_INVALID_REVNUM for the rev), just compare this directory
   PATH against itself in the previous revision.

   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 was path
(relative to EDIT_BATON's path) is PATH.

CMP_PATH/CMP_REV are the path/revision against which this directory
should be compared for changes.  If either is omitted (NULL for the
path, SVN_INVALID_REVNUM for the rev), just compare this directory
PATH against itself in the previous revision.

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 was path ( relative to EDIT_BATON ' s path ) is PATH . CMP_PATH / CMP_REV are the path / revision against which this directory should be compared for changes . If either is omitted ( NULL for the path SVN_INVALID_REVNUM for the rev ) just compare this directory PATH against itself in the previous revision . 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 *cmp_path,
               svn_revnum_t cmp_rev,
               void *edit_baton,
               struct dir_baton *pb,
               apr_pool_t *pool)
{
  struct edit_baton *eb = edit_baton;
  struct dir_baton *new_db = apr_pcalloc(pool, sizeof(*new_db));
  const char *full_path;
  SVN_ERR_ASSERT_NO_RETURN(!path || pb);
  if (pb)
    full_path = svn_relpath_join(eb->path, path, pool);
  else
    full_path = apr_pstrdup(pool, eb->path);
  if (cmp_path)
    cmp_path = svn_relpath_canonicalize(cmp_path, pool);
  new_db->edit_baton = eb;
  new_db->path = full_path;
  new_db->cmp_path = cmp_path;
  new_db->cmp_rev = cmp_rev;
  new_db->written_out = FALSE;
  new_db->deleted_entries = apr_hash_make(pool);
  new_db->check_name_collision = FALSE;
  new_db->pool = pool;
  return new_db;
}
static struct dir_baton * make_dir_baton ( const char * path , const char * cmp_path , svn_revnum_t cmp_rev , void * edit_baton , struct dir_baton * pb , apr_pool_t * pool ) { struct edit_baton * eb = edit_baton ; struct dir_baton * new_db = apr_pcalloc ( pool , sizeof ( * new_db ) ) ; const char * full_path ; SVN_ERR_ASSERT_NO_RETURN ( ! path || pb ) ; if ( pb ) full_path = svn_relpath_join ( eb -> path , path , pool ) ; else full_path = apr_pstrdup ( pool , eb -> path ) ; if ( cmp_path ) cmp_path = svn_relpath_canonicalize ( cmp_path , pool ) ; new_db -> edit_baton = eb ; new_db -> path = full_path ; new_db -> cmp_path = cmp_path ; new_db -> cmp_rev = cmp_rev ; new_db -> written_out = FALSE ; new_db -> deleted_entries = apr_hash_make ( pool ) ; new_db -> check_name_collision = FALSE ; new_db -> pool = pool ; return new_db ; }
Make a directory baton to represent the directory was path
(relative to EDIT_BATON's path) is PATH.
Make a directory baton to represent the directory was path ( relative to EDIT_BATON ' s path ) is PATH .
/* A path relative to nothing?  I don't think so. */ /* Construct the full path of this node. */ /* Remove leading slashes from copyfrom paths. */