svn commit: r1934426 - subversion/trunk/subversion/svn

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <177926733362.1154741.7889667083296161127@svn03-he-fi>
Author: rinrab
Date: Wed May 20 08:55:33 2026
New Revision: 1934426

Log:
Use UTF-8 alignement for the 'author' column in the 'svn blame' command.

* subversion/svn/blame-cmd.c
  (#include): Add svn_utf_private.h.
  (print_line_info): Call svn_utf__cstring_utf8_align_right() to
   prepare author.

Modified:
   subversion/trunk/subversion/svn/blame-cmd.c

Modified: subversion/trunk/subversion/svn/blame-cmd.c
==============================================================================
--- subversion/trunk/subversion/svn/blame-cmd.c	Wed May 20 08:30:24 2026	(r1934425)
+++ subversion/trunk/subversion/svn/blame-cmd.c	Wed May 20 08:55:33 2026	(r1934426)
@@ -24,6 +24,7 @@
 
 /*** Includes. ***/
 
+#include "private/svn_utf_private.h"
 #include "svn_client.h"
 #include "svn_error.h"
 #include "svn_dirent_uri.h"
@@ -150,8 +151,9 @@ print_line_info(svn_stream_t *out,
           time_stdout = "                                           -";
         }
 
-      SVN_ERR(svn_stream_printf(out, pool, "%s %10s %s ", rev_str,
-                                author ? author : "         -",
+      SVN_ERR(svn_stream_printf(out, pool, "%s %s %s ", rev_str,
+                                svn_utf__cstring_utf8_align_right(
+                                    author ? author : "-", 10, pool),
                                 time_stdout));
 
       if (path)
@@ -159,8 +161,9 @@ print_line_info(svn_stream_t *out,
     }
   else
     {
-      return svn_stream_printf(out, pool, "%s %10.10s ", rev_str,
-                               author ? author : "         -");
+      return svn_stream_printf(out, pool, "%s %s ", rev_str,
+                               svn_utf__cstring_utf8_align_right(
+                                   author ? author : "-", 10, pool));
     }
 
   return SVN_NO_ERROR;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.