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

Re: [PATCH] Re: bad output format design issue: svn log -v format is not parseable :-(

From: C.A.T.Magic <c.a.t.magic_at_gmx.at>
Date: 2004-04-05 19:01:23 CEST

Travis P wrote:

>
> On Apr 5, 2004, at 11:06 AM, C.A.T.Magic wrote:
>
>> patch1: svn status -v now truncates long usernames to the specified 12
>> characters to prevent ambiguity like in
>> >svn status -v
>> > 11 11 cat a file.txt
>> > 12 12 administrator johnMy spaced File.c
>>
>> - printf ("%c%c%c%c%c %c %6s %6s %-12s %s\n",
>> + printf ("%c%c%c%c%c %c %6s %6s %-12.12s %s\n",
>
>
> How'd you get 12 above? Wouldn't there be a space between john and My?
> (There is a space in the format string prior to the final %s.)
> Truncation of user names will naturally create new ambiguities between,
> e.g.
> "administrator john" and "administrator sally" who will both appear as
> "administrato"

because currently i don't care about the name (...) and
most applications work like this (cut off too long names).
cutting off is better because this way you can expect a certain item
to start at a specific column. ofcourse, the TAB solution would work in
this case too, if you prefer that one.
hmmm ... will the %6 ever overflow? at least the %c are stable.

> Given your other patch, I would think you'd want to just use tab between
> user name and file name.
> (Not that either of these is necessarily good for Subversion trunk. Not
> sure why you aren't exploring the XML output option.)

-) svn status does not have --xml output
-) there is probably a new issue with #13\r\n in the xml output.
-) xml is annoying to parse, good xml parsers are not free, and not easy
to embed in existing code (callbacks, etc). it also adds a new external
dependency to my code.

======
c.a.t.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Apr 5 19:01:57 2004

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

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