[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: truncated author names in 'svn ls -v' output

From: Vincent Lefevre <vincent-svn_at_vinc17.net>
Date: Mon, 26 Nov 2018 15:11:32 +0100

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 Lefvre <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)
Received on 2018-11-26 15:11:49 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.