Rework the path library to accept and return "" as the only canonical empty path. Make sure the client canonicalizes all paths passed to the libraries. The path library now assumes that its inputs are canonical. Remove the use of explicit "." except for a few special cases.
(svn_path_internal_style, svn_path_local_style, svn_path_join, svn_path_is_empty, svn_path_is_empty_nts, svn_path_compare_paths, svn_path_compare_paths_nts, svn_path_is_child, svn_path_is_single_path_component): Change to use new macros, or to use explicit '/', or to assert canonical input.
* subversion/clients/cmdline/util.c (svn_cl__args_to_target_array): Add canonicalization of paths. Move svn_path_basename call after UTF-8 and canonicalization. (svn_cl__edit_externally): Convert "" to "." to satisfy APR.
* subversion/tests/libsvn_subr/path-test.c (SVN_EMPTY_PATH): New macro.
(test_path_split): Remove non-canonical inputs. Add new tests. Test svn_path_split_nts as well.
(test_join, test_basename): Remove non-canonical inputs. Add new tests.
(test_canonicalize): New test.
* subversion/libsvn_subr/io.c (svn_io_remove_dir, svn_io_stat, svn_io_dir_open, apr_dir_is_empty): Convert "" to "." to satisfy APR.
More work on Issue #494. Make the client libraries and libsvn_ra_local use URI-encoded URLs throughout. It is the responsibility of the client application to supply valid URLs to the libraries it uses.
* subversion/libsvn_client/log.c (svn_client_log): Do not do URI encoding.
* subversion/libsvn_ra_local/split_url.c (svn_ra_local__split_URL): Decode the URL before hacking it up into pieces.
* subversion/libsvn_wc/adm_ops.c (svn_wc_add): URI-encode additional path components appended to URLs.
* subversion/libsvn_client/commit_util.c (harvest_committables, svn_client__harvest_committables): URI-encode additional path components appended to URLs. (do_item_commit): URI-decode the URL portions passed as paths. (push_stack): Rename 'rel_url' to 'rel_decoded_url'.
* subversion/libsvn_wc/update_editor.c (check_wc_root, add_directory): URI-encode additional path components appended to URLs. (close_edit): Simplify this function a little bit.
* subversion/libsvn_client/copy.c (repos_to_repos_copy, repos_to_wc_copy, wc_to_repos_copy): URI-decode the URL portions passed as paths.
* subversion/libsvn_client/diff.c (convert_to_url): Re-work this function. (polite_error): New. (do_diff): URI-decode the URL portions passed as paths.
* subversion/libsvn_client/ra.c (get_committed_rev, get_wc_prop, set_wc_prop): URI-decode URL for comparison as path.
The libsvn_ra_dav library is a bit much to tackle all at once, so rather than make it use encoded URLs internally throughout, I just *decoded* the now-encoded URLs coming into the interface (except where they are immediately re-encoded). Later, I will revert those decodings and make the ra_dav library use encoded URLs internally.