FreeBSD/contrib/subversion/subversion/libsvn_repos/dump.c
/* Hash iterator that verifies normalization and collision of paths in
   an svn:mergeinfo property. */
Hash iterator that verifies normalization and collision of paths in
an svn:mergeinfo property.
Hash iterator that verifies normalization and collision of paths in an svn : mergeinfo property .
static svn_error_t *
verify_mergeinfo_normalization(void *baton, const void *key, apr_ssize_t klen,
                               void *val, apr_pool_t *iterpool)
{
  struct verify_mergeinfo_normalization_baton *const vb = baton;
  const char *const path = key;
  const char *normpath;
  const char *found;
  SVN_ERR(svn_utf__normalize(&normpath, path, klen, &vb->buffer));
  found = svn_hash_gets(vb->normalized_paths, normpath);
  if (!found)
      svn_hash_sets(vb->normalized_paths,
                    apr_pstrdup(vb->buffer.pool, normpath),
                    normalized_unique);
  else if (found == normalized_collision)
    ;
  else
    {
      svn_hash_sets(vb->normalized_paths,
                    apr_pstrdup(vb->buffer.pool, normpath),
                    normalized_collision);
      notify_warning(iterpool, vb->notify_func, vb->notify_baton,
                     svn_repos_notify_warning_mergeinfo_collision,
                     _("Duplicate representation of path '%s'"
                       " in %s property of '%s'"),
                     normpath, SVN_PROP_MERGEINFO, vb->path);
    }
  return SVN_NO_ERROR;
}
static svn_error_t * verify_mergeinfo_normalization ( void * baton , const void * key , apr_ssize_t klen , void * val , apr_pool_t * iterpool ) { struct verify_mergeinfo_normalization_baton * const vb = baton ; const char * const path = key ; const char * normpath ; const char * found ; SVN_ERR ( svn_utf__normalize ( & normpath , path , klen , & vb -> buffer ) ) ; found = svn_hash_gets ( vb -> normalized_paths , normpath ) ; if ( ! found ) svn_hash_sets ( vb -> normalized_paths , apr_pstrdup ( vb -> buffer . pool , normpath ) , normalized_unique ) ; else if ( found == normalized_collision ) ; else { svn_hash_sets ( vb -> normalized_paths , apr_pstrdup ( vb -> buffer . pool , normpath ) , normalized_collision ) ; notify_warning ( iterpool , vb -> notify_func , vb -> notify_baton , svn_repos_notify_warning_mergeinfo_collision , _ ( " " " " ) , normpath , SVN_PROP_MERGEINFO , vb -> path ) ; } return SVN_NO_ERROR ; }
Hash iterator that verifies normalization and collision of paths in
an svn:mergeinfo property.
Hash iterator that verifies normalization and collision of paths in an svn : mergeinfo property .
/* Skip already reported collision */ /* Report path collision in mergeinfo */