FreeBSD/contrib/subversion/subversion/libsvn_wc/entries.c
/*
 * Encode tree conflict descriptions into a single string.
 *
 * Set *CONFLICT_DATA to a string, allocated in POOL, that encodes the tree
 * conflicts in CONFLICTS in a form suitable for storage in a single string
 * field in a WC entry. CONFLICTS is a hash of zero or more pointers to
 * svn_wc_conflict_description2_t objects, index by their basenames. All of the
 * conflict victim paths must be siblings.
 *
 * Do all allocations in POOL.
 *
 * @see svn_wc__read_tree_conflicts()
 */
Encode tree conflict descriptions into a single string.
Set *CONFLICT_DATA to a string, allocated in POOL, that encodes the tree
conflicts in CONFLICTS in a form suitable for storage in a single string
field in a WC entry. CONFLICTS is a hash of zero or more pointers to
svn_wc_conflict_description2_t objects, index by their basenames. All of the
conflict victim paths must be siblings.

Do all allocations in POOL.


Encode tree conflict descriptions into a single string . Set * CONFLICT_DATA to a string allocated in POOL that encodes the tree conflicts in CONFLICTS in a form suitable for storage in a single string field in a WC entry . CONFLICTS is a hash of zero or more pointers to svn_wc_conflict_description2_t objects index by their basenames . All of the conflict victim paths must be siblings . Do all allocations in POOL .
static svn_error_t *
write_tree_conflicts(const char **conflict_data,
                     apr_hash_t *conflicts,
                     apr_pool_t *pool)
{
  svn_skel_t *skel = svn_skel__make_empty_list(pool);
  apr_hash_index_t *hi;
  for (hi = apr_hash_first(pool, conflicts); hi; hi = apr_hash_next(hi))
    {
      svn_skel_t *c_skel;
      SVN_ERR(svn_wc__serialize_conflict(&c_skel, apr_hash_this_val(hi),
                                         pool, pool));
      svn_skel__prepend(c_skel, skel);
    }
  *conflict_data = svn_skel__unparse(skel, pool)->data;
  return SVN_NO_ERROR;
}
static svn_error_t * write_tree_conflicts ( const char * * conflict_data , apr_hash_t * conflicts , apr_pool_t * pool ) { svn_skel_t * skel = svn_skel__make_empty_list ( pool ) ; apr_hash_index_t * hi ; for ( hi = apr_hash_first ( pool , conflicts ) ; hi ; hi = apr_hash_next ( hi ) ) { svn_skel_t * c_skel ; SVN_ERR ( svn_wc__serialize_conflict ( & c_skel , apr_hash_this_val ( hi ) , pool , pool ) ) ; svn_skel__prepend ( c_skel , skel ) ; } * conflict_data = svn_skel__unparse ( skel , pool ) -> data ; return SVN_NO_ERROR ; }
Encode tree conflict descriptions into a single string.
Encode tree conflict descriptions into a single string .