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.
Start on issue #668 (create a .subversion/config file), in response to Gerald Richter <email@example.com>'s point that always storing auth information in the wc is a security risk. Patch started by Karl Fogel <firstname.lastname@example.org>, continued by me.
NOTE: I'm really disliking the fact that this code is using explicit strings for the 'section', 'name' and 'default_value' items in calls to svn_config_read_config(). I strongly believe these should all be #defines in svn_config.h.
ANOTHER NOTE: Not covered in this commit is the use of the diff_cmd and diff3_cmd config file options (which, ironically, is the whole reason I decided to attack this issue in the first place). I'm sleepy.
STILL ANOTHER NOTE: It occurs to me that some of these new options (specifically 'global_ignores', and perhaps 'do_store') could really foul up 'make check' if the developer has made custom changes to those config options. Just something to think about.
* subversion/libsvn_subr/config_impl.h (SVN_CONFIG__USR_CONFIG_FILE, SVN_REGISTRY_CONFIG_PROXY_KEY, SVN_REGISTRY_USR_CONFIG_CONFIG_PATH): New constants.
* subversion/libsvn_subr/config_file.c (svn_config_ensure): Init the new `config' file.
* subversion/libsvn_client/client.h (struct svn_client__callback_baton_t): Document new semantics of do_store field. (svn_client__open_ra_session): Document new semantics of do_store argument.
* subversion/include/svn_config.h (svn_config_read_config): New prototype.
* subversion/libsvn_subr/config.c (svn_config_read_config): New function.
* subversion/libsvn_wc/status.c (add_default_ignores): Add 'pool', make 'patterns' an apr_array_header_t **, and return svn_error_t *. Use the default ignores from the configuration files, and alloc the array. (add_unversioned_items): Remove 'no_ignore', add 'ignores'. (svn_wc_statuses): Get the default ignores (if we are honoring them).
* subversion/clients/cmdline/util.c (svn_cl__edit_externally): Use the config files to find the user's choice of editor commands, if such exists.