Create branch for implementing normalization-agnostic path indexes in wc.db.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1402685 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch: Create a minimal branch of the utf8proc upstream
package to eventually embed it into libsvn_subr.

Incidentally, this partial branch should make a great test case for Julian to
play with when he takes a stab at the new merge algorithm.

* subversion/libsvn_subr/utf8proc: Branch of ^/upstream/utf8proc.
* subversion/libsvn_subr/utf8proc/LICENSE,
  subversion/libsvn_subr/utf8proc/README,
  subversion/libsvn_subr/utf8proc/utf8proc.h,
  subversion/libsvn_subr/utf8proc/utf8proc.c,
  subversion/libsvn_subr/utf8proc/utf8proc_data.c:
   Only these files were retained on the branch.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1405766 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch: Modify utf8proc to enable inline embedding.

* subversion/libsvn_subr/utf8proc/utf8proc.h:
   Prefix all function declarations with UTF8PROC_API.
  (UTF8PROC_API, UTF8PROC_DATA, UTF8PROC_DATA_EXPORT): New macros; their
   values depend on UTF8PROC_INLINE.
  (utf8proc_utf8class): Only export if UTF8PROC_DATA_EXPORT is defined.

* subversion/libsvn_subr/utf8proc/utf8proc.c:
   Prefix all function definitions with UTF8PROC_API.
  (utf8proc_utf8class): Prefix definition with UTF8PROC_DATA.

* subversion/libsvn_subr/utf8proc/utf8proc_data.c:
   Prefix all data table definitions with UTF8PROC_DATA.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1405793 13f79535-47bb-0310-9956-ffa450edef68
Sync wc-collate-path branch with trunk up to r1405863.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1405866 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-branch: Mark utf8proc error messages for translation.

* subversion/libsvn_subr/utf8proc/utf8proc.c (N_): Conditionally define macro.
  (utf8proc_errmsg): Wrap all error messages in N_().


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406081 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch: Begin wrapping utf8proc.

* build.conf (private-includes): Add utf8proc.h, utf8proc.c and utf8proc_data.c
   from subversion/libsvn_subr/utf8proc/.

* subversion/include/svn_error_codes.h (SVN_ERR_UTF8PROC_ERROR): New error
   code for wrapped utf8proc errors.

* subversion/include/private/svn_utf_private.h: Update description.
  (svn_utf__decompose_normalized, svn_utf__utf8proc_version): New.

* subversion/libsvn_subr/utf8proc.c: New file.
  (svn_utf__decompose_normalized, svn_utf__utf8proc_version): Implement here.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406095 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch: UCS-4 string comparison and tests.

* subversion/include/private/svn_utf_private.h
  (svn_utf__ucs4cmp): New prototype.
  (svn_utf__decompose_normalized): Clarify docstring.
* subversion/libsvn_subr/utf8proc.c (svn_utf__ucs4cmp): Implement.

* subversion/tests/libsvn_subr/utf-test.c
  (test_utf_decompose_normalized_ucs4cmp): New testcase.
  (normalized_compare): New, helper for test_utf_decompose_normalized_ucs4cmp.
  (test_funcs): Add test_utf_decompose_normalized_ucs4cmp.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406276 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch:

* subversion/tests/libsvn_subr/utf-test.c
  (normalized_compare): Fix thinko in result verification that crept in
   during local refactoring.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406281 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch:

* subversion/tests/diacritical.txt: New;
   describes the normalized-compare test data.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406291 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch:

* subversion/tests/diacritical.txt: Add a space onto which the
   combining diacriticals can combine.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406298 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch:

* subversion/tests/libsvn_subr/utf-test.c:
  (normalized_compare): Optionally test decomposition with known string size.
  (test_utf_decompose_normalized_ucs4cmp): Use that option.
   Rename 'lowercase' to 'lowcase' to shorten lines.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406393 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch: Create a collation on SQLite connections.

* subversion/libsvn_subr/sqlite.c: Include svn_utf_private.h.
  (svn_sqlite__db_t): New members nfd_buf1, nfd_len1, nfd_buf2, nfd_len2.
  (compare_normalized_unicode) New; SQLite collation key comparator.
  (svn_sqlite__open): Initialize the comparison buffers in the DB context.
   Create collation SVN-UCS-NFD on the new connection.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406407 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch:

* subversion/tests/libsvn_subr/utf-test.c
  (test_utf_decompose_normalized_ucs4cmp): More exhaustive tests.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406410 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch: Fix silly thinko in the definition of
the return value of the normalized unicode comparator, which was exactly
the opposite of common usage, as in, e.g., strcmp.

* subversion/include/private/svn_utf_private.h (svn_utf__ucs4cmp): Fix docstring.
* subversion/libsvn_subr/utf8proc.c (svn_utf__ucs4cmp): Fix implementation.
* subversion/tests/libsvn_subr/utf-test.c (normalized_compare): Fix expectation.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406412 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch:

* subversion/tests/diacritical.txt
  (svn:mime-type):  Set, to declare the file's charset.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406483 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch: Fix Thinko in Collation, and other stories.

* subversion/libsvn_subr/sqlite.c
  (collate_ucs_nfd): Renamed from compare_normalized_unicode.
   Use the correct lengths when calling svn_utf__ucs4cmp.
  (svn_sqlite__open): Lowercase collation name to "svn-ucs-nfd".


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406545 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch:

* subversion/tests/libsvn_subr/utf-test.c (normalized_compare):
   Fix debug and error result printout to match comparator semantics.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406555 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch:

* subversion/tests/libsvn_subr/utf-test.c (normalized_compare):
   Add quotes around strings in the error message.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406558 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-path branch:

* subversion/libsvn_subr/sqlite.c (collate_ucs_nfd):
   Optimize cases where one or both keys have zero length.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1406580 13f79535-47bb-0310-9956-ffa450edef68
On the wc-collate-paths branch: Prepare to horrendously abuse stringbufs
as general-purpose, growable memory buffers.

* subversion/include/private/svn_string_private.h (svn_stringbuf__reserve): New.
* subversion/libsvn_subr/string.c (my__realloc): Remove.
  (svn_stringbuf__reserve): Implments stringbuf memory reallocation but does
   not touch the data or the length.
  (svn_stringbuf_ensure): Reimplement using svn_stringbuf__reserve.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/wc-collate-path@1407337 13f79535-47bb-0310-9956-ffa450edef68