Hi, While I tested the filename transcoding issue in svn_cmdline__file_edit_externally() on Windows, I found that I couldn't specifiy SVN_EDITOR path contains a space even if I tried the method described in FAQ[1].
[1] https://subversion.apache.org/faq.html#svn-editor e.g. (Using CP65001) [[[ C:\Users\futatuki\work\svn-test\wc2>prompt $N$G C>set SVN_EDITOR="C:\Program Files (x86)\Vim\vim82\vim.exe" -R C>svn propedit svn:ignore . 'C:Program' is not recognized as an iternal or external command, oprable program or batch file. svn: E200012: system('"C:\Program Files (x86)\Vim\vim82\vim.exe" -R "svn-prop.tmp"') returned 1 ]]] (I don't really want modify svn:ignore, so I specified "-R".) If I modified svn_cmdline__edit_string_externally() not to escape edit file name, "svn propedit svn:ignore ." could execute editor successfully. (attached file unbreak-svn_cmdline__edit_string_externally-on-win-patch.txt) Is it related the behavor of "cmd.exe /c ..." described on https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cmd ? """ If you specify /c or /k, cmd processes, the remainder of string, and the quotation marks are preserved only if all of the following conditions are met: You don't also use /s. You use exactly one set of quotation marks. You don't use any special characters within the quotation marks (for example: & < > ( ) @ ^ | ). You use one or more white-space characters within the quotation marks. The string within quotation marks is the name of an executable file. If the previous conditions aren't met, string is processed by examining the first character to verify whether it is an opening quotation mark. If the first character is an opening quotation mark, it is stripped along with the closing quotation mark. Any text following the closing quotation marks is preserved. """ ...and how do we deal this? Does quoting whole command string with "" resolve it? Thanks, -- Yasuhito FUTATSUKI <futat...@yf.bsclub.org>
Index: subversion/libsvn_subr/cmdline.c =================================================================== --- subversion/libsvn_subr/cmdline.c (revision 1882265) +++ subversion/libsvn_subr/cmdline.c (working copy) @@ -1600,8 +1600,7 @@ goto cleanup; /* Prepare the editor command line. */ - err = svn_utf_cstring_from_utf8(&tmpfile_native, - escape_path(pool, tmpfile_name), pool); + err = svn_utf_cstring_from_utf8(&tmpfile_native, tmpfile_name, pool); if (err) goto cleanup;