[MERGE/RFC] log refactoring

Ian Clatworthy ian.clatworthy at internode.on.net
Thu Jan 15 16:09:30 GMT 2009


John Arbash Meinel wrote:
> Ian Clatworthy wrote:
>> This patch refactors the implementation of log so
>> that --short logging iterates most of the time,
>> rather than being O(history) as often as it currently is.

> To start with, this seems mostly like a refactoring with an attempt to
> change this code:
> if (    not generate_merge_revisions
>     and start_revision is end_revision is None
>     and direction == 'reverse'
>     and specific_fileid is None):
>     return _linear_view_revisions(branch)
> 
> Into a different generator, which can handle when "start_revision" and
> "end_revision" is not None. Is that a reasonable summary?

Yes. Right now, "log --short" begins displaying output immediately.
If any parameters are given, that behaviour is dropped in favour
of collecting everything before displaying anything. :-(

The goal of this particular refactoring is to always display
output as soon as we can for the --short and --line formats,
regardless of whatever parameters are passed.

Ian C.



More information about the bazaar mailing list