You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2022/03/27 18:03:46 UTC

svn commit: r1899257 - in /subversion/branches/1.14.x: ./ STATUS subversion/libsvn_subr/cmdline.c

Author: svn-role
Date: Sun Mar 27 18:03:46 2022
New Revision: 1899257

URL: http://svn.apache.org/viewvc?rev=1899257&view=rev
Log:
Merge the r1887641 group from trunk:

 * r1887641, r1890013
   Fix encoding of error message on failure of system() call.
   Justification:
     Error messages should be displayed correctly even if non UTF-8 locale.
   Votes:
     +1: futatuki, markphip, hartmannathan

Modified:
    subversion/branches/1.14.x/   (props changed)
    subversion/branches/1.14.x/STATUS
    subversion/branches/1.14.x/subversion/libsvn_subr/cmdline.c

Propchange: subversion/branches/1.14.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1887641,1890013

Modified: subversion/branches/1.14.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.14.x/STATUS?rev=1899257&r1=1899256&r2=1899257&view=diff
==============================================================================
--- subversion/branches/1.14.x/STATUS (original)
+++ subversion/branches/1.14.x/STATUS Sun Mar 27 18:03:46 2022
@@ -116,13 +116,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1887641, r1890013
-   Fix encoding of error message on failure of system() call.
-   Justification:
-     Error messages should be displayed correctly even if non UTF-8 locale.
-   Votes:
-     +1: futatuki, markphip, hartmannathan
-
  * r1889629
    Document how the port number is passed to custom tunnels.
    Justification:

Modified: subversion/branches/1.14.x/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/libsvn_subr/cmdline.c?rev=1899257&r1=1899256&r2=1899257&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/branches/1.14.x/subversion/libsvn_subr/cmdline.c Sun Mar 27 18:03:46 2022
@@ -1499,10 +1499,16 @@ svn_cmdline__edit_file_externally(const
                       stderr, TRUE /* fatal */, "svn: ");
 
   if (sys_err)
-    /* Extracting any meaning from sys_err is platform specific, so just
-       use the raw value. */
-    return svn_error_createf(SVN_ERR_EXTERNAL_PROGRAM, NULL,
-                             _("system('%s') returned %d"), cmd, sys_err);
+    {
+      const char *cmd_utf8;
+
+      /* Extracting any meaning from sys_err is platform specific, so just
+         use the raw value. */
+      SVN_ERR(svn_path_cstring_to_utf8(&cmd_utf8, cmd, pool));
+      return svn_error_createf(SVN_ERR_EXTERNAL_PROGRAM, NULL,
+                               _("system('%s') returned %d"),
+                               cmd_utf8, sys_err);
+    }
 
   return SVN_NO_ERROR;
 }
@@ -1648,8 +1654,8 @@ svn_cmdline__edit_string_externally(svn_
     goto cleanup;
 
   /* Prepare the editor command line.  */
-  err = svn_utf_cstring_from_utf8(&tmpfile_native,
-                                  escape_path(pool, tmpfile_name), pool);
+  err = svn_path_cstring_from_utf8(&tmpfile_native,
+                                   escape_path(pool, tmpfile_name), pool);
   if (err)
     goto cleanup;
 
@@ -1678,10 +1684,14 @@ svn_cmdline__edit_string_externally(svn_
 #endif
   if (sys_err != 0)
     {
+      const char *cmd_utf8;
+
       /* Extracting any meaning from sys_err is platform specific, so just
          use the raw value. */
+      SVN_ERR(svn_path_cstring_to_utf8(&cmd_utf8, cmd, pool));
       err =  svn_error_createf(SVN_ERR_EXTERNAL_PROGRAM, NULL,
-                               _("system('%s') returned %d"), cmd, sys_err);
+                               _("system('%s') returned %d"),
+                               cmd_utf8, sys_err);
       goto cleanup;
     }