Checkout
rhuijben
committed
on 09 Apr 11
Make the conversion functions from internal path style to local style assume
that their input is canonical. But just to be safe don't make t… Show more
Make the conversion functions from internal path style to local style assume

that their input is canonical. But just to be safe don't make the dirent

variant fail on non canonical paths.

These functions are used in too many error messages to make them take the

penalty of full canonicalization on all their input. (My profiler says that

just this canonicalize in the to local style function takes over 0.5% of

my checkout time, while it is never needed.)

* subversion/include/svn_dirent_uri.h

 (header): Remove *_local_style from the list of functions that allows non

   canonical paths.

* subversion/libsvn_subr/dirent_uri.c

 (SVN_USE_DOS_PATHS): Update comment.

 (local_style): Remove expensive canonicalization.

 (svn_relpath_local_style): Add maintainer mode only path style verification,

   like we do in other path functions.

* subversion/tests/libsvn_subr/dirent_uri-test.c

 (SVN_USE_DOS_PATHS): Update comment.

 (test_dirent_local_style): Add two testcases.

 (test_relpath_local_style): Remove now invalid case.

 (test_dirent_internal_style): Add new case.

* subversion/tests/libsvn_subr/path-test.c

 (SVN_USE_DOS_PATHS): Define macro and update all users.

 (test_path_canonicalize): Enable testvalue that was disabled.

 (test_path_local_style): Update expected result.

Show less