~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-24 04:24:57 UTC
  • mfrom: (4183.6.5 251352-re-compile)
  • Revision ID: pqm@pqm.ubuntu.com-20090324042457-53xouxxcxehxoi5v
(mbp) better error on bad regexps

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
from bzrlib.osutils import (
83
83
    format_date,
84
84
    get_terminal_encoding,
 
85
    re_compile_checked,
85
86
    terminal_width,
86
87
    )
87
88
 
587
588
    """
588
589
    if search is None:
589
590
        return log_rev_iterator
590
 
    # Compile the search now to get early errors.
591
 
    searchRE = re.compile(search, re.IGNORECASE)
 
591
    searchRE = re_compile_checked(search, re.IGNORECASE,
 
592
            'log message filter')
592
593
    return _filter_message_re(searchRE, log_rev_iterator)
593
594
 
594
595