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

Re: [PATCH] Fix alignment of blame output containing revision numbers >= 1000000

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 17 Jun 2010 23:01:10 +0200

On Thu, Jun 17, 2010 at 5:54 PM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
> Julian Foad wrote:
>> My recommendation:  Let's strive for compatibility where we can, and
>> where the old behaviour is reasonable.  I think a 6-character minimum
>> column width is reasonable for most purposes, even though it's not the
>> purest design.
>
> +1

Ok, thanks for the feedback, all.

In attachment a new version of the patch, which is compatible with the
old behavior for sub-1000000 end_revnum's. make check now passes. I've
also added a comment in the source explaining what's going on with the
6 and the 1000000 (feel free to edit/lose that comment if you want).

And an updated log message:
[[[
Make "svn blame" use a consistent column width even when revision
numbers are >= 1000000.

* subversion/include/svn_client.h
 (svn_client_blame_receiver3_t): Add parameters start_revnum and end_revnum,
  useful to the blame receiver in formatting its output.
* subversion/libsvn_client/blame.c
 (svn_client_blame5): Pass start_revnum and end_revnum to the blame receiver.
* subversion/svn/blame-cmd.c
 (blame_receiver_xml): Implement the updated svn_client_blame_receiver3_t.
 (blame_receiver): Implement the updated svn_client_blame_receiver3_t, and
  pass end_revnum to print_line_info.
 (print_line_info): Add parameter end_revnum, use it to increase the column
  width for the revision number if needed.
* subversion/libsvn_client/deprecated.c
 (blame_wrapper_receiver2): Implement the updated
  svn_client_blame_receiver3_t.
]]]

Cheers,

-- 
Johan

Received on 2010-06-17 23:01:49 CEST

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.