RFC: logging refactoring/tweak

Martin Pool mbp at canonical.com
Mon Aug 4 03:46:23 BST 2008


On Sun, Aug 3, 2008 at 11:30 AM, Robert Collins
<robertc at robertcollins.net> wrote:
> I'd like to make bzr log -m use bzr search. Having looked at the current
> code, I propose to make the following changes:
>
> change this bit of code in log.py:
>    for (rev_id, revno, merge_depth), rev, delta in _iter_revisions(
>        branch.repository, view_revisions, generate_delta):
>        if searchRE:
>            if not searchRE.search(rev.message):
>
> To:
>  - push the search evaluation in to the _iter_revisions call
>  - use a stack of iterators that can be nested (e.g. to allow
>   delta generation to be done after searchRE is evaluated, and to
>   allow bzr-search to eliminate parts of view_revisions)
>
> Thoughts?

That sounds good.  Rather than poking this into _iter_revisions maybe
we can change this into some kind of composition pipeline, where
looking into the full text index is generating the set of revisions to
search...

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list