You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by kf...@collab.net on 2005/01/12 17:37:24 UTC

Re: [ENHANCEMENT/BUG] svn list --verbose should not cut the author in the output

Laszlo Kishalmi <la...@epam.com> writes:
> It seems that the command line subversion client cuts the author at
> 8th character in its output.
> This command would be perfect to generate a list of the files in the
> repository with the current author.
> We have several colleagues here with the same long forename, so I have
> to collect this info in an other way.

[I've switched this thread to dev@.]

This has long bothered me too.  In 'svn status' output, we print 12
columns worth of username.  But in 'svn ls', we only print 8 columns
of username.

Why the difference?  I'm not sure.  Maybe we were trying to be similar
to some old versions of Unix 'ls'?  In any case, it's annoying now.
Our own committers jerenkrantz and jszakmeister get cut off in 'ls -v'
output, for example.

It would be an incompatible API change to go to 12 as the default for
'ls -v' now.  But it would be okay to add a run-time configuration
parameter to control this width.  How would people feel about that?

Specifically: 

A new section "[output]" in ~/.subversion/config, with a new parameters
"[ls-username-width]" and "[status-username-width]", thus:

   ### Section for controlling output formats of the command-line client.
   [output]
   # Show up to this many columns of username in 'svn ls -v' output.
   # ls-username-width = 8
   # Show up to this many columns of username in 'svn status' output.
   # status-username-width = 12

I'm definitely open to more elegant solutions, by the way.  It's
somewhat displeasing to have to use two different parameter.  Really
there should only be one, "username-width".  But the trouble is
compatibility: right now Subversion uses two different default widths,
one for ls and one for status.  Since our internal implementation of
configurable control would need to reflect these separate defaults, we
are pretty much forced (I think?) to use two separate parameters.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [ENHANCEMENT/BUG] svn list --verbose should not cut the author in the output

Posted by kf...@collab.net.
"Brian W. Fitzpatrick" <fi...@collab.net> writes:
> > >> This has long bothered me too.  In 'svn status' output, we print 12
> > >> columns worth of username.  But in 'svn ls', we only print 8 columns
> > >> of username.
> > [...]
> > >> It would be an incompatible API change to go to 12 as the default for
> > >> 'ls -v' now.  But it would be okay to add a run-time configuration
> > >> parameter to control this width.  How would people feel about that?
> > > 
> > > I think that it's silly to add a configuration option to fix what is, in 
> > > my opinion, a bug.  I don't see how this is the lesser of two evils 
> > > (breaking compatibility being the other "evil").
> > > 
> > > If we didn't have an API that folks can use from C, Java, Python, and 
> > > Perl, and parsing output from svn was your only recourse, I might bend 
> > > on this.  As it stands, I'm strongly -1 on adding a run-time config 
> > > parameter.  This is a bug, let's just fix it.
> > 
> > What is the bug that you see?  What do you see as a suitable "fix"?  
> 
> That it's not the same width as it is in 'svn status' output.

The situation is more subtle than that, as a lurker just pointed out
to me privately:

> Please note that, including spaces, 'svn ls -v' prints "exactly eight"
> characters, chopping if necessary, while 'svn st -v' prints "at least
> twelve" characters and it does not chop anything.

Does this affect the proposed fix?



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [ENHANCEMENT/BUG] svn list --verbose should not cut the authorin the output

Posted by Chris Foote <cf...@v21.me.uk>.
From: "Brian W. Fitzpatrick" <fi...@collab.net>
Sent: Saturday, January 15, 2005 6:12 AM


> On Fri, 2005-01-14 at 05:07, Julian Foad wrote:
>> Brian W. Fitzpatrick wrote:
>> > On Jan 12, 2005, at 11:37 AM, kfogel@collab.net wrote:
>> >> Laszlo Kishalmi <la...@epam.com> writes:
>> >>> It seems that the command line subversion client cuts the author at
>> >>> 8th character in its output.
>> >>
>> >> This has long bothered me too.  In 'svn status' output, we print 12
>> >> columns worth of username.  But in 'svn ls', we only print 8 columns
>> >> of username.
>> [...]
>> >> It would be an incompatible API change to go to 12 as the default for
>> >> 'ls -v' now.  But it would be okay to add a run-time configuration
>> >> parameter to control this width.  How would people feel about that?
>> >
>> > I think that it's silly to add a configuration option to fix what is, 
>> > in
>> > my opinion, a bug.  I don't see how this is the lesser of two evils
>> > (breaking compatibility being the other "evil").
>> >
>> > If we didn't have an API that folks can use from C, Java, Python, and
>> > Perl, and parsing output from svn was your only recourse, I might bend
>> > on this.  As it stands, I'm strongly -1 on adding a run-time config
>> > parameter.  This is a bug, let's just fix it.
>>
>> What is the bug that you see?  What do you see as a suitable "fix"?
>
> That it's not the same width as it is in 'svn status' output.
>

Just fixing this in 1.2 seems to the best IMO, as I believe that the output
for the status command has already been changed on the locking branch.

Chris 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [ENHANCEMENT/BUG] svn list --verbose should not cut the author in the output

Posted by Julian Foad <ju...@btopenworld.com>.
Brian W. Fitzpatrick wrote:
> On Fri, 2005-01-14 at 05:07, Julian Foad wrote:
>>What is the bug that you see?  What do you see as a suitable "fix"?  
> 
> That it's not the same width as it is in 'svn status' output.

Oh, I see.  I suppose we could fix/change that.  I thought the bug we were 
talking about was that long user names were cut off.


It is not just "svn list" and "svn status" that are inconsistent, and not just 
in width and truncation of user names.

             name  revision  date
svn list      8       7+     12
svn status   12+      6+
svn blame    10+      6+     44
   ["+" means "or more; not truncated"]

If we do something about name width, we should probably do something about 
revision number width and date width at the same time:

"svn blame" currently uses an in-between field width of 10 characters, but 
(like "status") does not truncate longer names, which makes it unparseable 
anyway if names longer than 10 characters contain spaces.

In "svn status" we can and should increase the revision number width compatibly 
to 7 or 8 by extending into spaces that already exist to the left of it.  Note 
that APR is already using 6-digit Subversion revision numbers.

It would seem appropriate for "blame" to use the same abbreviated date format 
that is used by "list".


So, it looks some rationalisation of field widths and truncation is in order. 
Either a few tweaks, in which case we might try to get away with claiming they 
are bug fixes*, or a clean sweep that brings them all into line with each 
other, probably only if some option is set.

Regardless of any "--xml" option that may get implemented soon, I'd be 
moderately keen on sorting this out too.

- Julian


* Well, they are bugs, but design bugs that have been out in the field for a 
while now, and we can't necessarily get away with just fixing them.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [ENHANCEMENT/BUG] svn list --verbose should not cut the author in the output

Posted by "Brian W. Fitzpatrick" <fi...@collab.net>.
On Fri, 2005-01-14 at 05:07, Julian Foad wrote:
> Brian W. Fitzpatrick wrote:
> > On Jan 12, 2005, at 11:37 AM, kfogel@collab.net wrote:
> >> Laszlo Kishalmi <la...@epam.com> writes:
> >>> It seems that the command line subversion client cuts the author at
> >>> 8th character in its output.
> >>
> >> This has long bothered me too.  In 'svn status' output, we print 12
> >> columns worth of username.  But in 'svn ls', we only print 8 columns
> >> of username.
> [...]
> >> It would be an incompatible API change to go to 12 as the default for
> >> 'ls -v' now.  But it would be okay to add a run-time configuration
> >> parameter to control this width.  How would people feel about that?
> > 
> > I think that it's silly to add a configuration option to fix what is, in 
> > my opinion, a bug.  I don't see how this is the lesser of two evils 
> > (breaking compatibility being the other "evil").
> > 
> > If we didn't have an API that folks can use from C, Java, Python, and 
> > Perl, and parsing output from svn was your only recourse, I might bend 
> > on this.  As it stands, I'm strongly -1 on adding a run-time config 
> > parameter.  This is a bug, let's just fix it.
> 
> What is the bug that you see?  What do you see as a suitable "fix"?  

That it's not the same width as it is in 'svn status' output.

-Fitz


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [ENHANCEMENT/BUG] svn list --verbose should not cut the author in the output

Posted by Julian Foad <ju...@btopenworld.com>.
Brian W. Fitzpatrick wrote:
> On Jan 12, 2005, at 11:37 AM, kfogel@collab.net wrote:
>> Laszlo Kishalmi <la...@epam.com> writes:
>>> It seems that the command line subversion client cuts the author at
>>> 8th character in its output.
>>
>> This has long bothered me too.  In 'svn status' output, we print 12
>> columns worth of username.  But in 'svn ls', we only print 8 columns
>> of username.
[...]
>> It would be an incompatible API change to go to 12 as the default for
>> 'ls -v' now.  But it would be okay to add a run-time configuration
>> parameter to control this width.  How would people feel about that?
> 
> I think that it's silly to add a configuration option to fix what is, in 
> my opinion, a bug.  I don't see how this is the lesser of two evils 
> (breaking compatibility being the other "evil").
> 
> If we didn't have an API that folks can use from C, Java, Python, and 
> Perl, and parsing output from svn was your only recourse, I might bend 
> on this.  As it stands, I'm strongly -1 on adding a run-time config 
> parameter.  This is a bug, let's just fix it.

What is the bug that you see?  What do you see as a suitable "fix"?  Choosing 
some other fixed width?  No, that would just fix it for some user names. 
Making it variable-width?  Then how to quote it for names containing spaces, etc.?

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [ENHANCEMENT/BUG] svn list --verbose should not cut the author in the output

Posted by "Brian W. Fitzpatrick" <fi...@red-bean.com>.
On Jan 12, 2005, at 11:37 AM, kfogel@collab.net wrote:

> Laszlo Kishalmi <la...@epam.com> writes:
>> It seems that the command line subversion client cuts the author at
>> 8th character in its output.
>> This command would be perfect to generate a list of the files in the
>> repository with the current author.
>> We have several colleagues here with the same long forename, so I have
>> to collect this info in an other way.
>
> [I've switched this thread to dev@.]
>
> This has long bothered me too.  In 'svn status' output, we print 12
> columns worth of username.  But in 'svn ls', we only print 8 columns
> of username.
>
> Why the difference?  I'm not sure.  Maybe we were trying to be similar
> to some old versions of Unix 'ls'?  In any case, it's annoying now.
> Our own committers jerenkrantz and jszakmeister get cut off in 'ls -v'
> output, for example.
>
> It would be an incompatible API change to go to 12 as the default for
> 'ls -v' now.  But it would be okay to add a run-time configuration
> parameter to control this width.  How would people feel about that?

I think that it's silly to add a configuration option to fix what is, 
in my opinion, a bug.  I don't see how this is the lesser of two evils 
(breaking compatibility being the other "evil").

If we didn't have an API that folks can use from C, Java, Python, and 
Perl, and parsing output from svn was your only recourse, I might bend 
on this.  As it stands, I'm strongly -1 on adding a run-time config 
parameter.  This is a bug, let's just fix it.

-Fitz


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [ENHANCEMENT/BUG] svn list --verbose should not cut the author in the output

Posted by Julian Foad <ju...@btopenworld.com>.
Getting back to the recent report that prompted me to add "svn list --xml"...

Laszlo Kishalmi <la...@epam.com> writes:
>It seems that the command line subversion client cuts the author at
>8th character in its output.
>This command would be perfect to generate a list of the files in the
>repository with the current author.

Well, that's perhaps not the intended use of "svn list", but not wrong either. 
  Maybe the new "svn list --xml" will solve this particular case.

>We have several colleagues here with the same long forename, so I have
>to collect this info in an other way.

This scanario is not uncommon.  Some development teams have a custom of people 
going by their initials, so user names are very short.  Some companies allocate 
people their full first and last names, perhaps with a space or some other 
character in between, thus making long user names.  In some cultures, people's 
names are generally much longer than in others.

The more I think about it, the more I like the idea of a config option for user 
name field width in command-line client displays.

Karl Fogel wrote:
 >   ### Section for controlling output formats of the command-line client.
 >   [output]
 >   ### Show up to this many columns of username in (e.g.) 'svn ls -v'
 >   ### and 'svn status' output.  If you specify a value, it will apply to
 >   ### all commands that print usernames.  If you don't, the default is 8
 >   ### columns for 'svn ls', and 12 columns for 'svn status' (this is for
 >   ### backwards compatibility with versions before this parameter was
 >   ### configurable.
 >   # username-width = 12
 >
 > If there are any other width-sensitive places where we print username,
 > we'll include them too, I just haven't dug around for them yet.

That solves part of the problem in a compatible and fairly neat way.  (Yes, it 
adds another config option, but it seems worth it in this case.)

Related problems (sorry, "opportunities", as my manager used to say) are:

+ "list" cuts off the user name whereas "status" and "blame" expand the field 
instead.  This is needlessly inconsistent, but I'm not sure which behaviour is 
better.

+ The revision number fields also have inconsistent width among "list", 
"status" and "blame".

+ The 44-character date in "blame -v" is, IMO, too long, and should be changed 
to the short form that "list" uses.

+ The output of "status" is going to change anyway to accommodate locking.

I wonder if there is a way to address several of these issues in one go.

At least, I would like to implement the "username-width" option if others agree.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org