FreeBSD/contrib/subversion/subversion/libsvn_fs_x/tree.c
/* Find the youngest copyroot for path PARENT_PATH or its parents in
   filesystem FS, and store the copyroot in *REV_P and *PATH_P. */
Find the youngest copyroot for path PARENT_PATH or its parents in
filesystem FS, and store the copyroot in *REV_P and *PATH_P.
Find the youngest copyroot for path PARENT_PATH or its parents in filesystem FS and store the copyroot in * REV_P and * PATH_P .
static svn_error_t *
find_youngest_copyroot(svn_revnum_t *rev_p,
                       const char **path_p,
                       svn_fs_t *fs,
                       parent_path_t *parent_path)
{
  svn_revnum_t rev_mine;
  svn_revnum_t rev_parent = SVN_INVALID_REVNUM;
  const char *path_mine;
  const char *path_parent = NULL;
  if (parent_path->parent)
    SVN_ERR(find_youngest_copyroot(&rev_parent, &path_parent, fs,
                                   parent_path->parent));
  SVN_ERR(svn_fs_x__dag_get_copyroot(&rev_mine, &path_mine,
                                     parent_path->node));
  if (rev_mine >= rev_parent)
    {
      *rev_p = rev_mine;
      *path_p = path_mine;
    }
  else
    {
      *rev_p = rev_parent;
      *path_p = path_parent;
    }
  return SVN_NO_ERROR;
}
static svn_error_t * find_youngest_copyroot ( svn_revnum_t * rev_p , const char * * path_p , svn_fs_t * fs , parent_path_t * parent_path ) { svn_revnum_t rev_mine ; svn_revnum_t rev_parent = SVN_INVALID_REVNUM ; const char * path_mine ; const char * path_parent = NULL ; if ( parent_path -> parent ) SVN_ERR ( find_youngest_copyroot ( & rev_parent , & path_parent , fs , parent_path -> parent ) ) ; SVN_ERR ( svn_fs_x__dag_get_copyroot ( & rev_mine , & path_mine , parent_path -> node ) ) ; if ( rev_mine >= rev_parent ) { * rev_p = rev_mine ; * path_p = path_mine ; } else { * rev_p = rev_parent ; * path_p = path_parent ; } return SVN_NO_ERROR ; }
Find the youngest copyroot for path PARENT_PATH or its parents in
filesystem FS, and store the copyroot in *REV_P and *PATH_P.
Find the youngest copyroot for path PARENT_PATH or its parents in filesystem FS and store the copyroot in * REV_P and * PATH_P .
/* First find our parent's youngest copyroot. */ /* Find our copyroot. */ /* If a parent and child were copied to in the same revision, prefer
     the child copy target, since it is the copy relevant to the
     history of the child. */