You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/12/24 05:54:51 UTC

svn commit: r1553244 - in /subversion/trunk/subversion: include/svn_repos.h libsvn_repos/dump.c svnadmin/svnadmin.c tests/cmdline/svnadmin_tests.py

Author: brane
Date: Tue Dec 24 04:54:51 2013
New Revision: 1553244

URL: http://svn.apache.org/r1553244
Log:
Removed the check for denormalized names from "svnadmin verify".
We're really only interested in possible name collisions, not
individual names.

* subversion/include/svn_repos.h (svn_repos_notify_warning_t):
   Removed enumeration constants svn_repos_notify_warning_denormalized_name
   and svn_repos_notify_warning_denormalized_mergeinfo.
  (svn_repos_verify_fs3): Updated docstring.
* subversion/svnadmin/svnadmin.c (options_table):
   Updated documentation for the --check-normalization option.
* subversion/libsvn_repos/dump.c (normalized_unique, normalized_collision):
   Added documentation.
  (check_path_normalization): Removed.
  (verify_mergeinfo_normalization):
   Removed check for individual denormalized names.
  (add_directory, add_file): Removed calls to check_path_normalization.
* subversion/tests/cmdline/svnadmin_tests.py (verify_denormalized_names):
   Updated the expected output to account for the changed semantics
   of "svnadmin verify --check-normalization".

Modified:
    subversion/trunk/subversion/include/svn_repos.h
    subversion/trunk/subversion/libsvn_repos/dump.c
    subversion/trunk/subversion/svnadmin/svnadmin.c
    subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py

Modified: subversion/trunk/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_repos.h?rev=1553244&r1=1553243&r2=1553244&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_repos.h (original)
+++ subversion/trunk/subversion/include/svn_repos.h Tue Dec 24 04:54:51 2013
@@ -287,14 +287,6 @@ typedef enum svn_repos_notify_warning_t
   svn_repos_notify_warning_invalid_fspath,
 
   /**
-   * Found a denormalized name. Reported when the name of a directoy
-   * entry is not normalized to Unicode Normalization Form C.
-   *
-   * @since New in 1.9.
-   */
-  svn_repos_notify_warning_denormalized_name,
-
-  /**
    * Detected a name collision. Reported when the names of two or more
    * entries in the same directory differ only in character
    * representation (normalization), but are otherwise identical.
@@ -304,15 +296,6 @@ typedef enum svn_repos_notify_warning_t
   svn_repos_notify_warning_name_collision,
 
   /**
-   * Found a denormalized mergeinfo entry. Reported when the path in
-   * an entry in the svn:mergeinfo property is not normalized to
-   * Unicode Normalization Form C.
-   *
-   * @since New in 1.9.
-   */
-  svn_repos_notify_warning_denormalized_mergeinfo,
-
-  /**
    * Detected a mergeinfo path collision. Reported when the paths in
    * two or more entries in the same svn:mergeinfo property differ
    * only in character representation (normalization), but are
@@ -2694,11 +2677,10 @@ svn_repos_info_format(int *repos_format,
  * not notified. Finally, return an error if there were any failures during
  * verification, or SVN_NO_ERROR if there were no failures.
  *
- * If @a check_normalization is @c TRUE, verify that all path names in
- * the repository and in @c svn:mergeinfo entries are normaized to
- * Unicode Normalization Form C, and report any name collisions within
- * the same directory or svn:mergeinfo property where the names differ
- * only in character representation, but are otherwise identical.
+ * If @a check_normalization is @c TRUE, report any name collisions
+ * within the same directory or svn:mergeinfo property where the names
+ * differ only in character representation, but are otherwise
+ * identical.
  *
  * @since New in 1.9.
  */

Modified: subversion/trunk/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=1553244&r1=1553243&r2=1553244&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Tue Dec 24 04:54:51 2013
@@ -585,42 +585,11 @@ node_must_not_exist(struct edit_baton *e
   return SVN_NO_ERROR;
 }
 
-
+/* Unique string pointers used by verify_mergeinfo_normalization()
+   and check_name_collision() */
 static const char normalized_unique[] = "normalized_unique";
 static const char normalized_collision[] = "normalized_collision";
 
-static svn_error_t *
-check_path_normalization(const char *path,
-                         svn_node_kind_t kind,
-                         svn_repos_notify_func_t notify_func,
-                         void *notify_baton,
-                         apr_pool_t *scratch_pool)
-{
-  const char *const name = svn_relpath_basename(path, scratch_pool);
-  if (!svn_utf__is_normalized(name, scratch_pool))
-    {
-      svn_repos_notify_t *const notify =
-        svn_repos_notify_create(svn_repos_notify_warning, scratch_pool);
-      notify->warning = svn_repos_notify_warning_denormalized_name;
-      switch (kind)
-        {
-        case svn_node_dir:
-          notify->warning_str = apr_psprintf(
-              scratch_pool, _("Denormalized directory name '%s'"), path);
-          break;
-        case svn_node_file:
-          notify->warning_str = apr_psprintf(
-              scratch_pool, _("Denormalized file name '%s'"), path);
-          break;
-        default:
-          notify->warning_str = apr_psprintf(
-              scratch_pool, _("Denormalized entry name '%s'"), path);
-        }
-      notify_func(notify_baton, notify, scratch_pool);
-    }
-  return SVN_NO_ERROR;
-}
-
 
 /* Baton for extract_mergeinfo_paths */
 struct extract_mergeinfo_paths_baton
@@ -696,18 +665,6 @@ verify_mergeinfo_normalization(void *bat
   const char *found;
 
   SVN_ERR(svn_utf__normalize(&normpath, path, klen, &vb->buffer));
-  if (0 != strcmp(path, normpath))
-    {
-      /* Report denormlized mergeinfo path */
-      svn_repos_notify_t *const notify =
-        svn_repos_notify_create(svn_repos_notify_warning, iterpool);
-      notify->warning = svn_repos_notify_warning_denormalized_mergeinfo;
-      notify->warning_str = apr_psprintf(
-          iterpool, _("Denormalized path '%s' in %s property of '%s'"),
-          path, SVN_PROP_MERGEINFO, vb->path);
-      vb->notify_func(vb->notify_baton, notify, iterpool);
-    }
-
   found = svn_hash_gets(vb->normalized_paths, normpath);
   if (!found)
       svn_hash_sets(vb->normalized_paths,
@@ -1363,14 +1320,11 @@ add_directory(const char *path,
     /* Delete the path, it's now been dumped. */
     svn_hash_sets(pb->deleted_entries, path, NULL);
 
-  /* Check for UCS normalization and name clashes, but only if this is
-     actually a new name in the parent, not a replacement. */
+  /* Check for normalized name clashes, but only if this is actually a
+     new name in the parent, not a replacement. */
   if (!val && eb->verify && eb->check_normalization && eb->notify_func)
     {
       pb->check_name_collision = TRUE;
-      SVN_ERR(check_path_normalization(
-                  path, svn_node_dir,
-                  eb->notify_func, eb->notify_baton, pool));
     }
 
   new_db->written_out = TRUE;
@@ -1472,20 +1426,17 @@ add_file(const char *path,
                     is_copy ? copyfrom_rev : SVN_INVALID_REVNUM,
                     pool));
 
-  /* Check for UCS normalization and name clashes, but only if this is
-     actually a new name in the parent, not a replacement. */
+  if (val)
+    /* delete the path, it's now been dumped. */
+    svn_hash_sets(pb->deleted_entries, path, NULL);
+
+  /* Check for normalized name clashes, but only if this is actually a
+     new name in the parent, not a replacement. */
   if (!val && eb->verify && eb->check_normalization && eb->notify_func)
     {
       pb->check_name_collision = TRUE;
-      SVN_ERR(check_path_normalization(
-                  path, svn_node_file,
-                  eb->notify_func, eb->notify_baton, pool));
     }
 
-  if (val)
-    /* delete the path, it's now been dumped. */
-    svn_hash_sets(pb->deleted_entries, path, NULL);
-
   *file_baton = NULL;  /* muhahahaha */
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1553244&r1=1553243&r2=1553244&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Tue Dec 24 04:54:51 2013
@@ -304,10 +304,8 @@ static const apr_getopt_option_t options
     {"file", 'F', 1, N_("read repository paths from file ARG")},
 
     {"check-normalization", svnadmin__check_normalization, 0,
-     N_("report paths in the filesystem and mergeinfo\n"
-        "                             that are not normalized to Unicode Normalization\n"
-        "                             Form C, and any names within the same directory\n"
-        "                             or svn:mergeinfo property value that differ only\n"
+     N_("report any names within the same directory or\n"
+        "                             svn:mergeinfo property value that differ only\n"
         "                             in character representation, but are otherwise\n"
         "                             identical")},
 

Modified: subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py?rev=1553244&r1=1553243&r2=1553244&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py Tue Dec 24 04:54:51 2013
@@ -2184,24 +2184,15 @@ def verify_denormalized_names(sbox):
 
   expected_output_regex_list = [
     ".*Verified revision 0.",
-                                                # A/{Eacute}
-    "WARNING 0x0003: Denormalized directory name 'A/.*'",
-                                           # A/{icircumflex}{odiaeresis}ta
-    "WARNING 0x0003: Denormalized file name 'A/.*ta'",
     ".*Verified revision 1.",
     ".*Verified revision 2.",
     ".*Verified revision 3.",
                                            # A/{Eacute}/{aring}lpha
-    "WARNING 0x0003: Denormalized file name 'A/.*/.*lpha'",
-    "WARNING 0x0004: Duplicate representation of path 'A/.*/.*lpha'",
+    "WARNING 0x0003: Duplicate representation of path 'A/.*/.*lpha'",
     ".*Verified revision 4.",
     ".*Verified revision 5.",
-                                       # Q/{aring}lpha
-    "WARNING 0x0005: Denormalized path '/Q/.*lpha'"
-                                  # A/{Eacute}
-    " in svn:mergeinfo property of 'A/.*'",
                                                       # Q/{aring}lpha
-    "WARNING 0x0006: Duplicate representation of path '/Q/.*lpha'"
+    "WARNING 0x0004: Duplicate representation of path '/Q/.*lpha'"
                                   # A/{Eacute}
     " in svn:mergeinfo property of 'A/.*'",
     ".*Verified revision 6.",