Followup to r1874093, add Windows-specific argument escaping
Rather than directly using apr_pescape_shell(), use apr_escape_shell() to give an indication whether escaping is needed. If APR reports no escaping is needed, simply surround the argument in double-quotes to handle any embedded whitespace.
When escaping is needed, on Unix we continue to use APR's escaping + post-processing for whitespace. On Windows, perform the escaping ourselves per these rules:
1. Surround the string with double-quotes 2. Escape any double-quotes or backslashes preceding a double-quote 3. Escape any metacharacters, including double-quotes, with ^
* subversion/libsvn_subr/cmdline.c (escape_path): Refactored as above
Followup to r1874057, escape whitespace instead of quoting filename
As danielsh pointed out, only specific characters can be escaped by a backslash in quoted shell strings. Rather than surrounding the escaped path with double quotes, post-process the quoted path and manually escape any whitespace that is present.
* subversion/libsvn_subr/cmdline.c (escape_path): New function, wrapper around apr_pescape_shell(), which handles escaping of whitespace. (svn_cmdline__edit_file_externally, svn_cmdline__edit_string_externally): Call the new function instead of apr_pescape_shell() * subversion/tests/cmdline/update_tests.py (update_accept_conflicts): Include ';' in renamed path ("p; i"), to ensure non-whitespace escaping is handled correctly.