Log Message: |
Escape filenames when invoking $SVN_EDITOR
Per https://subversion.apache.org/faq.html#svn-editor, $SVN_EDITOR is invoked
through the shell instead of directly executed. The user is expected to
properly escape/quote $SVN_EDITOR, but svn was putting the filename directly
into the command without any escaping. This therefore breaks attempts to,
e.g., run the editor from the merge conflict dialog when a path has special
characters.
Update locations where we invoke the editor to quote the filename as well as
escape shell special characters using apr_pescape_shell(). The quotes are
needed in addition to the escaping, since apr_pescape_shell() does not escape
whitespace.
* subversion/libsvn_subr/cmdline.c
(svn_cmdline__edit_file_externally, svn_cmdline__edit_string_externally):
Quote and escape, via apr_pescape_shell(), the filename in the command line.
* subversion/tests/cmdline/update_test.py
(update_accept_conflicts): Rename "A/D/G/pi" to "A/D/G/p i" before performing
the merge, so the test exercises the changes above.
|