subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Lefevre <vincent-...@vinc17.net>
Subject Re: truncated author names in 'svn ls -v' output
Date Mon, 26 Nov 2018 14:11:32 GMT
On 2018-11-23 09:10:50 +0100, Stefan Sperling wrote:
> At 16 columns, name collisions become far less likely. In our own project,
> the output would now look like this:
[...]

Yes, but this makes less space for long filenames.

Why not make this size user-configurable, so that each user may choose
which size is best for him? (Ideally one should be able to choose a
configuration that depends on the repository.)

So...

> Index: subversion/svn/list-cmd.c
> ===================================================================
> --- subversion/svn/list-cmd.c	(revision 1846851)
> +++ subversion/svn/list-cmd.c	(working copy)
> @@ -150,7 +150,7 @@ print_dirent(void *baton,
>                               dirent->size);
>  
>        return svn_cmdline_printf
> -              (scratch_pool, "%7ld %-8.8s %c %10s %12s %s%s\n",
> +              (scratch_pool, "%7ld %-16.16s %c %10s %12s %s%s\n",
>                 dirent->created_rev,
>                 dirent->last_author ? dirent->last_author : " ? ",
>                 lock ? 'O' : ' ',

You could use * for the width and precision fields.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Mime
View raw message