FreeBSD/contrib/subversion/subversion/libsvn_repos/dump.c
/* Check UCS normalization of mergeinfo for PATH. NEW_MERGEINFO is the
   svn:mergeinfo property value being set; OLD_MERGEINFO is the
   previous property value, which may be NULL. Only the paths that
   were added in are checked, including collision checks. This
   minimizes the number of notifications we generate for a given
   mergeinfo property. */
Check UCS normalization of mergeinfo for PATH. NEW_MERGEINFO is the
svn:mergeinfo property value being set; OLD_MERGEINFO is the
previous property value, which may be NULL. Only the paths that
were added in are checked, including collision checks. This
minimizes the number of notifications we generate for a given
mergeinfo property.
Check UCS normalization of mergeinfo for PATH . NEW_MERGEINFO is the svn : mergeinfo property value being set ; OLD_MERGEINFO is the previous property value which may be NULL . Only the paths that were added in are checked including collision checks . This minimizes the number of notifications we generate for a given mergeinfo property .
static svn_error_t *
check_mergeinfo_normalization(const char *path,
                              const char *new_mergeinfo,
                              const char *old_mergeinfo,
                              svn_repos_notify_func_t notify_func,
                              void *notify_baton,
                              apr_pool_t *pool)
{
  svn_mergeinfo_t mergeinfo;
  apr_hash_t *normalized_paths;
  apr_hash_t *added_paths;
  struct extract_mergeinfo_paths_baton extract_baton;
  struct verify_mergeinfo_normalization_baton verify_baton;
  SVN_ERR(svn_mergeinfo_parse(&mergeinfo, new_mergeinfo, pool));
  extract_baton.result = apr_hash_make(pool);
  extract_baton.normalize = FALSE;
  svn_membuf__create(&extract_baton.buffer, 0, pool);
  SVN_ERR(svn_iter_apr_hash(NULL, mergeinfo,
                            extract_mergeinfo_paths,
                            &extract_baton, pool));
  added_paths = extract_baton.result;
  if (old_mergeinfo)
    {
      struct filter_mergeinfo_paths_baton filter_baton;
      svn_mergeinfo_t oldinfo;
      extract_baton.result = apr_hash_make(pool);
      extract_baton.normalize = TRUE;
      SVN_ERR(svn_mergeinfo_parse(&oldinfo, old_mergeinfo, pool));
      SVN_ERR(svn_iter_apr_hash(NULL, oldinfo,
                                extract_mergeinfo_paths,
                                &extract_baton, pool));
      normalized_paths = extract_baton.result;
      filter_baton.paths = added_paths;
      SVN_ERR(svn_iter_apr_hash(NULL, oldinfo,
                                filter_mergeinfo_paths,
                                &filter_baton, pool));
    }
  else
      normalized_paths = apr_hash_make(pool);
  verify_baton.path = path;
  verify_baton.normalized_paths = normalized_paths;
  verify_baton.buffer = extract_baton.buffer;
  verify_baton.notify_func = notify_func;
  verify_baton.notify_baton = notify_baton;
  SVN_ERR(svn_iter_apr_hash(NULL, added_paths,
                            verify_mergeinfo_normalization,
                            &verify_baton, pool));
  return SVN_NO_ERROR;
}
static svn_error_t * check_mergeinfo_normalization ( const char * path , const char * new_mergeinfo , const char * old_mergeinfo , svn_repos_notify_func_t notify_func , void * notify_baton , apr_pool_t * pool ) { svn_mergeinfo_t mergeinfo ; apr_hash_t * normalized_paths ; apr_hash_t * added_paths ; struct extract_mergeinfo_paths_baton extract_baton ; struct verify_mergeinfo_normalization_baton verify_baton ; SVN_ERR ( svn_mergeinfo_parse ( & mergeinfo , new_mergeinfo , pool ) ) ; extract_baton . result = apr_hash_make ( pool ) ; extract_baton . normalize = FALSE ; svn_membuf__create ( & extract_baton . buffer , 0 , pool ) ; SVN_ERR ( svn_iter_apr_hash ( NULL , mergeinfo , extract_mergeinfo_paths , & extract_baton , pool ) ) ; added_paths = extract_baton . result ; if ( old_mergeinfo ) { struct filter_mergeinfo_paths_baton filter_baton ; svn_mergeinfo_t oldinfo ; extract_baton . result = apr_hash_make ( pool ) ; extract_baton . normalize = TRUE ; SVN_ERR ( svn_mergeinfo_parse ( & oldinfo , old_mergeinfo , pool ) ) ; SVN_ERR ( svn_iter_apr_hash ( NULL , oldinfo , extract_mergeinfo_paths , & extract_baton , pool ) ) ; normalized_paths = extract_baton . result ; filter_baton . paths = added_paths ; SVN_ERR ( svn_iter_apr_hash ( NULL , oldinfo , filter_mergeinfo_paths , & filter_baton , pool ) ) ; } else normalized_paths = apr_hash_make ( pool ) ; verify_baton . path = path ; verify_baton . normalized_paths = normalized_paths ; verify_baton . buffer = extract_baton . buffer ; verify_baton . notify_func = notify_func ; verify_baton . notify_baton = notify_baton ; SVN_ERR ( svn_iter_apr_hash ( NULL , added_paths , verify_mergeinfo_normalization , & verify_baton , pool ) ) ; return SVN_NO_ERROR ; }
Check UCS normalization of mergeinfo for PATH.
Check UCS normalization of mergeinfo for PATH .