Index: subversion/libsvn_subr/cmdline.c =================================================================== --- subversion/libsvn_subr/cmdline.c (revision 1881848) +++ subversion/libsvn_subr/cmdline.c (working copy) @@ -1400,6 +1400,7 @@ apr_pool_t *pool) { const char *editor, *cmd, *base_dir, *file_name, *base_dir_apr; + const char *file_name_local; char *old_cwd; int sys_err; apr_status_t apr_err; @@ -1423,9 +1424,11 @@ return svn_error_wrap_apr (apr_err, _("Can't change working directory to '%s'"), base_dir); + SVN_ERR(svn_path_cstring_from_utf8(&file_name_local, + escape_path(pool, file_name), pool)); /* editor is explicitly documented as being interpreted by the user's shell, and as such should already be quoted/escaped as needed. */ - cmd = apr_psprintf(pool, "%s %s", editor, escape_path(pool, file_name)); + cmd = apr_psprintf(pool, "%s %s", editor, file_name_local); sys_err = system(cmd); apr_err = apr_filepath_set(old_cwd, pool); @@ -1581,13 +1584,14 @@ goto cleanup; /* Prepare the editor command line. */ - err = svn_utf_cstring_from_utf8(&tmpfile_native, tmpfile_name, pool); + err = svn_utf_cstring_from_utf8(&tmpfile_native, + escape_path(pool, tmpfile_name), pool); if (err) goto cleanup; /* editor is explicitly documented as being interpreted by the user's shell, and as such should already be quoted/escaped as needed. */ - cmd = apr_psprintf(pool, "%s %s", editor, escape_path(pool, tmpfile_native)); + cmd = apr_psprintf(pool, "%s %s", editor, tmpfile_native); /* If the caller wants us to leave the file around, return the path of the file we'll use, and make a note not to destroy it. */