FreeBSD/contrib/subversion/subversion/libsvn_fs_x/tree.c
/* Get the id of a node referenced by path PATH in ROOT.  Return the
   id in *ID_P allocated in POOL. */
Get the id of a node referenced by path PATH in ROOT.  Return the
id in *ID_P allocated in POOL.
Get the id of a node referenced by path PATH in ROOT . Return the id in * ID_P allocated in POOL .
static svn_error_t *
x_node_id(const svn_fs_id_t **id_p,
          svn_fs_root_t *root,
          const char *path,
          apr_pool_t *pool)
{
  svn_fs_x__id_t noderev_id;
  if ((! root->is_txn_root)
      && (path[0] == '\0' || ((path[0] == '/') && (path[1] == '\0'))))
    {
      svn_fs_x__init_rev_root(&noderev_id, root->rev);
    }
  else
    {
      dag_node_t *node;
      SVN_ERR(get_dag(&node, root, path, pool));
      noderev_id = *svn_fs_x__dag_get_id(node);
    }
  *id_p = svn_fs_x__id_create(svn_fs_x__id_create_context(root->fs, pool),
                              &noderev_id, pool);
  return SVN_NO_ERROR;
}
static svn_error_t * x_node_id ( const svn_fs_id_t * * id_p , svn_fs_root_t * root , const char * path , apr_pool_t * pool ) { svn_fs_x__id_t noderev_id ; if ( ( ! root -> is_txn_root ) && ( path [ 0 ] == ' \0 ' || ( ( path [ 0 ] == ' ' ) && ( path [ 1 ] == ' \0 ' ) ) ) ) { svn_fs_x__init_rev_root ( & noderev_id , root -> rev ) ; } else { dag_node_t * node ; SVN_ERR ( get_dag ( & node , root , path , pool ) ) ; noderev_id = * svn_fs_x__dag_get_id ( node ) ; } * id_p = svn_fs_x__id_create ( svn_fs_x__id_create_context ( root -> fs , pool ) , & noderev_id , pool ) ; return SVN_NO_ERROR ; }
Get the id of a node referenced by path PATH in ROOT.
Get the id of a node referenced by path PATH in ROOT .
/* Optimize the case where we don't need any db access at all.
         The root directory ("" or "/") node is stored in the
         svn_fs_root_t object, and never changes when it's a revision
         root, so we can just reach in and grab it directly. */