Hi all, Sorry it took a while to respond (been away for a while). I've been thinking a little about this, looking at the code ...
I see 3 options: 1) Determine the max length of revnum (and author) in blame.c, either while building the blame chunks or in an extra loop before sending the blame info to the blame receiver (and adding the max length(s) as extra parameters to the receiver). 2) Determine the max length of revnum (and author) in blame_cmd.c, i.e. the command line command. To do this, it would have to buffer the blame info that it receives in the blame_receiver callback, determining the maximum length(s) in the meantime. 3) Add some fixed amount of extra characters to revnum and/or author. I don't like 1) and 2). With 1) we're introducing overhead in blame.c (and messing with the blame_receiver API) for something that's only needed for command line use. I suppose all the GUI clients don't care about these lengths, so they shouldn't be impacted by something that's only needed for cmd line. And 2), it really seems a bad idea to introduce buffering of the entire blame info (hence the entire file that's being blamed), just to fix the alignment (memory footprint, not as streamy anymore, ...). So, I'd like to do 3), and add just 1 (one) extra character for revnum. With 1 extra character, we'd have up to 9,999,999 for revnum. Even for http://websvn.kde.org/trunk/, starting at 1113881 and adding 100k revisions every 8 months, that would give us 59 years until we hit that (let's say it accelerates somewhat, so 30 years might be a better estimate, but that's still plenty of time). I think 1 more character should be fine for most command line users with 80 character limits, no? Besides, in practice, I don't think dynamically determining the maximum width would save you much (maybe the first 6 months after crossing the 1,000,000 mark; but after that I just think the probability of having at least one >1m rev in your blame output would be pretty high). Unless someone else has another brilliant idea? For author: I think it's best to just truncate that to the 10 characters that are available (I haven't checked if that isn't done already). Cheers, -- Johan