FreeBSD/contrib/subversion/subversion/libsvn_repos/dump.c
/* Scan the directory and report all entry names that differ only in
   Unicode character representation. */
Scan the directory and report all entry names that differ only in
Unicode character representation.
Scan the directory and report all entry names that differ only in Unicode character representation .
static svn_error_t *
check_name_collision(void *baton, const void *key, apr_ssize_t klen,
                     void *val, apr_pool_t *iterpool)
{
  struct check_name_collision_baton *const cb = baton;
  const char *name;
  const char *found;
  SVN_ERR(svn_utf__normalize(&name, key, klen, &cb->buffer));
  found = svn_hash_gets(cb->normalized, name);
  if (!found)
    svn_hash_sets(cb->normalized, apr_pstrdup(cb->buffer.pool, name),
                  normalized_unique);
  else if (found == normalized_collision)
    ;
  else
    {
      struct dir_baton *const db = cb->dir_baton;
      struct edit_baton *const eb = db->edit_baton;
      const char* normpath;
      svn_hash_sets(cb->normalized, apr_pstrdup(cb->buffer.pool, name),
                    normalized_collision);
      SVN_ERR(svn_utf__normalize(
                  &normpath, svn_relpath_join(db->path, name, iterpool),
                  SVN_UTF__UNKNOWN_LENGTH, &cb->buffer));
      notify_warning(iterpool, eb->notify_func, eb->notify_baton,
                     svn_repos_notify_warning_name_collision,
                     _("Duplicate representation of path '%s'"), normpath);
    }
  return SVN_NO_ERROR;
}
static svn_error_t * check_name_collision ( void * baton , const void * key , apr_ssize_t klen , void * val , apr_pool_t * iterpool ) { struct check_name_collision_baton * const cb = baton ; const char * name ; const char * found ; SVN_ERR ( svn_utf__normalize ( & name , key , klen , & cb -> buffer ) ) ; found = svn_hash_gets ( cb -> normalized , name ) ; if ( ! found ) svn_hash_sets ( cb -> normalized , apr_pstrdup ( cb -> buffer . pool , name ) , normalized_unique ) ; else if ( found == normalized_collision ) ; else { struct dir_baton * const db = cb -> dir_baton ; struct edit_baton * const eb = db -> edit_baton ; const char * normpath ; svn_hash_sets ( cb -> normalized , apr_pstrdup ( cb -> buffer . pool , name ) , normalized_collision ) ; SVN_ERR ( svn_utf__normalize ( & normpath , svn_relpath_join ( db -> path , name , iterpool ) , SVN_UTF__UNKNOWN_LENGTH , & cb -> buffer ) ) ; notify_warning ( iterpool , eb -> notify_func , eb -> notify_baton , svn_repos_notify_warning_name_collision , _ ( " " ) , normpath ) ; } return SVN_NO_ERROR ; }
Scan the directory and report all entry names that differ only in
Unicode character representation.
Scan the directory and report all entry names that differ only in Unicode character representation .
/* Skip already reported collision */