FreeBSD/contrib/subversion/subversion/libsvn_fs_x/cached_data.c
/* Return the cache object in FS responsible to storing the directory the
 * NODEREV plus the corresponding pre-allocated *KEY.
 */
Return the cache object in FS responsible to storing the directory the
NODEREV plus the corresponding pre-allocated *KEY.
Return the cache object in FS responsible to storing the directory the NODEREV plus the corresponding pre - allocated * KEY .
static svn_cache__t *
locate_dir_cache(svn_fs_t *fs,
                 svn_fs_x__id_t *key,
                 svn_fs_x__noderev_t *noderev)
{
  svn_fs_x__data_t *ffd = fs->fsap_data;
  if (svn_fs_x__is_txn(noderev->noderev_id.change_set))
    {
      *key = noderev->noderev_id;
    }
  else
    {
      if (noderev->data_rep)
        {
          *key = noderev->data_rep->id;
        }
      else
        {
          key->change_set = SVN_FS_X__INVALID_CHANGE_SET;
          key->number = SVN_FS_X__ITEM_INDEX_UNUSED;
        }
    }
  return ffd->dir_cache;
}
static svn_cache__t * locate_dir_cache ( svn_fs_t * fs , svn_fs_x__id_t * key , svn_fs_x__noderev_t * noderev ) { svn_fs_x__data_t * ffd = fs -> fsap_data ; if ( svn_fs_x__is_txn ( noderev -> noderev_id . change_set ) ) { * key = noderev -> noderev_id ; } else { if ( noderev -> data_rep ) { * key = noderev -> data_rep -> id ; } else { key -> change_set = SVN_FS_X__INVALID_CHANGE_SET ; key -> number = SVN_FS_X__ITEM_INDEX_UNUSED ; } } return ffd -> dir_cache ; }
Return the cache object in FS responsible to storing the directory the
 NODEREV plus the corresponding pre-allocated *KEY.
Return the cache object in FS responsible to storing the directory the NODEREV plus the corresponding pre - allocated * KEY .
/* data in txns must be addressed by ID since the representation has
         not been created, yet. */ /* committed data can use simple rev,item pairs */ /* no data rep -> empty directory.
             Use a key that does definitely not clash with non-NULL reps. */