Merge lp:~jelmer/brz/dont-match into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/dont-match
Merge into: lp:brz
Diff against target: 12 lines (+1/-1)
1 file modified
breezy/log.py (+1/-1)
To merge this branch: bzr merge lp:~jelmer/brz/dont-match
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+326121@code.launchpad.net

This proposal supersedes a proposal from 2017-06-22.

Commit message

Don't apply matcher logic unless --match is specified in ``bzr log``.

Description of the change

Quick performance fix for ``bzr log`` - don't run regexes over all logs that are printed *unless* one of the --match options is specified.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/log.py'
--- breezy/log.py 2017-06-05 20:48:31 +0000
+++ breezy/log.py 2017-06-22 01:57:07 +0000
@@ -861,7 +861,7 @@
861 :return: An iterator over lists of ((rev_id, revno, merge_depth), rev,861 :return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
862 delta).862 delta).
863 """863 """
864 if match is None:864 if not match:
865 return log_rev_iterator865 return log_rev_iterator
866 searchRE = [(k, [re.compile(x, re.IGNORECASE) for x in v])866 searchRE = [(k, [re.compile(x, re.IGNORECASE) for x in v])
867 for k, v in match.items()]867 for k, v in match.items()]

Subscribers

People subscribed via source and target branches