'svn blame' should adjust to the maximum username width for a given invocation,
instead of either truncating or giving ragged edges on long usernames. By
adjusting conditionally, it could handle usernames like 'williamlyonphelpsIII'
when they appear, but not pay the price for them when they don't. For example:
$ svn blame hello.c
3828 jsmith
3828 jsmith void main (int argc, char **argv)
1729 jsmith {
1729 jsmith printf ("Hello, world!\n");
3828 jsmith exit (0);
3828 jsmith }
$ svn blame goodbye.c
3828 williamlyonphelpsIII
3828 williamlyonphelpsIII void main (int argc, char **argv)
1729 jsmith {
1729 jsmith printf ("Goodbye, world!\n");
3828 williamlyonphelpsIII exit (0);
3828 williamlyonphelpsIII }
Note that the output remains automatically parseable even though the width
cannot be predicted (actually, the output would be automatically parseable even
if the width varied within an invocation -- the real reason to keep it fixed per
invocation is human readability).
MBK points out that this will require an API change, because the interface that
prints the output needs to get the width from the API that provides the blame
information. He suggests that the API offer the usernames in a hash, instead of
just offering the max width, so that other client presentations become possible
(also, the provider can't know how string length corresponds to display width --
only the caller can know that).
We could do a similar trick with the revision number, by the way. It seems that
we're prepared to handle 7-digit revisions without any raggedness right now, but
currently that wastes three spaces in, for example, the Subversion repository,
which is still in the four digits.
If this change does not go into 1.0, we may want to hold off on applying it in
trunk, to avoid an early API divergence.