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

Re: "svn list -v" column alignment issue

From: Vincent Lefevre <vincent-svn_at_vinc17.net>
Date: Tue, 7 Jan 2020 16:17:10 +0100

On 2019-12-23 06:35:08 +0000, Daniel Shahaf wrote:
> Vincent Lefevre wrote on Mon, 23 Dec 2019 02:21 +00:00:
> > On 2019-12-21 08:09:46 +0000, Daniel Shahaf wrote:
> > > Vincent Lefevre wrote on Sat, Dec 21, 2019 at 00:09:09 +0100:
> > > > There's something wrong with "svn list -v" column alignment when
> > > > there are author names with more than 8 characters. For instance,
> > > > with the gcc repository:
> > > >
> > > > [...]
> > > > 279442 jozefl Dec 16 12:02 libgcc/
> > > > 278886 jvdelisle Dec 01 23:29 libgfortran/
> > > > [...]
> > >
> > > As implemented, the width is initially 8 but as soon as a longer name is seen,
> > > subsequent lines will be aligned with that, up to a maximum length of 16.
> > >
> > > Do you have a better algorithm to propose?
> >
> > cache the maximum length name in the working-copy data.
>
> Let's see. We could cache the value in wc.db. Running 'ls' or 'blame' [the
> same considerations apply to both] would update the cache; running 'cleanup'
> would purge it.
>
> Two things are not immediately clear to me:
>
> - This info is only needed by the cmdline client, not by other
> library users. This suggests the API should be generic. A
> per-client cache, maybe? There's already a
> svn_client_ctx_t::client_name so it's not unprecedented.

Well, you don't know what the library users will do. Perhaps the cache
will benefit them too. The value can be used by them or not. In any
case, making the information available will not hurt.

> - What the cache keys should be. wc.db is designed to be shared
> among multiple WC's, so presumably the cache should be per-wcroot
> or possibly per-repository?

I don't understand. The wc.db file is inside the .svn directory of
the WC. How can it be shared by multiple WC's?

> Oh. I missed it before, but passing -H increases the minimum width to 14.
> That's not obvious from the --help output and variable names.

But 14 is still a bit too small for me, and -H prevents the exact
sizes from being output.

-- 
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)
Received on 2020-01-07 16:17:23 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.