FreeBSD/contrib/subversion/subversion/libsvn_fs_x/revprops.c
/* Parse the serialized revprops in CONTENT and return them in *PROPERTIES.
 * Also, put them into the revprop cache, if activated, for future use.
 * Three more parameters are being used to update the revprop cache: FS is
 * our file system, the revprops belong to REVISION and the global revprop
 * GENERATION is used as well.
 *
 * The returned hash will be allocated in RESULT_POOL, SCRATCH_POOL is
 * being used for temporary allocations.
 */
Parse the serialized revprops in CONTENT and return them in *PROPERTIES.
Also, put them into the revprop cache, if activated, for future use.
Three more parameters are being used to update the revprop cache: FS is
our file system, the revprops belong to REVISION and the global revprop
GENERATION is used as well.

The returned hash will be allocated in RESULT_POOL, SCRATCH_POOL is
being used for temporary allocations.
Parse the serialized revprops in CONTENT and return them in * PROPERTIES . Also put them into the revprop cache if activated for future use . Three more parameters are being used to update the revprop cache : FS is our file system the revprops belong to REVISION and the global revprop GENERATION is used as well . The returned hash will be allocated in RESULT_POOL SCRATCH_POOL is being used for temporary allocations .
static svn_error_t *
parse_revprop(apr_hash_t **properties,
              svn_fs_t *fs,
              svn_revnum_t revision,
              apr_int64_t generation,
              svn_string_t *content,
              apr_pool_t *result_pool,
              apr_pool_t *scratch_pool)
{
  svn_stream_t *stream = svn_stream_from_string(content, scratch_pool);
  *properties = apr_hash_make(result_pool);
  SVN_ERR(svn_hash_read2(*properties, stream, SVN_HASH_TERMINATOR,
                         result_pool));
  if (has_revprop_cache(fs, scratch_pool))
    {
      svn_fs_x__data_t *ffd = fs->fsap_data;
      svn_fs_x__pair_cache_key_t key = { 0 };
      key.revision = revision;
      key.second = generation;
      SVN_ERR(svn_cache__set(ffd->revprop_cache, &key, *properties,
                             scratch_pool));
    }
  return SVN_NO_ERROR;
}
static svn_error_t * parse_revprop ( apr_hash_t * * properties , svn_fs_t * fs , svn_revnum_t revision , apr_int64_t generation , svn_string_t * content , apr_pool_t * result_pool , apr_pool_t * scratch_pool ) { svn_stream_t * stream = svn_stream_from_string ( content , scratch_pool ) ; * properties = apr_hash_make ( result_pool ) ; SVN_ERR ( svn_hash_read2 ( * properties , stream , SVN_HASH_TERMINATOR , result_pool ) ) ; if ( has_revprop_cache ( fs , scratch_pool ) ) { svn_fs_x__data_t * ffd = fs -> fsap_data ; svn_fs_x__pair_cache_key_t key = { 0 } ; key . revision = revision ; key . second = generation ; SVN_ERR ( svn_cache__set ( ffd -> revprop_cache , & key , * properties , scratch_pool ) ) ; } return SVN_NO_ERROR ; }
Parse the serialized revprops in CONTENT and return them in *PROPERTIES.
Parse the serialized revprops in CONTENT and return them in * PROPERTIES .