~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Robert Collins
  • Date: 2010-06-28 02:41:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5324.
  • Revision ID: robertc@robertcollins.net-20100628024122-g951fzp74f3u6wst
Sanity check that new_trace_file in pop_log_file is valid, and also fix a test that monkey patched get_terminal_encoding.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
    format_date,
87
87
    format_date_with_offset_in_original_timezone,
88
88
    get_terminal_encoding,
 
89
    re_compile_checked,
89
90
    terminal_width,
90
91
    )
91
92
from bzrlib.symbol_versioning import (
810
811
    """
811
812
    if search is None:
812
813
        return log_rev_iterator
813
 
    searchRE = re.compile(search, re.IGNORECASE)
 
814
    searchRE = re_compile_checked(search, re.IGNORECASE,
 
815
            'log message filter')
814
816
    return _filter_message_re(searchRE, log_rev_iterator)
815
817
 
816
818
 
2017
2019
      kind is one of values 'directory', 'file', 'symlink', 'tree-reference'.
2018
2020
      branch will be read-locked.
2019
2021
    """
2020
 
    from builtins import _get_revision_range
 
2022
    from builtins import _get_revision_range, safe_relpath_files
2021
2023
    tree, b, path = bzrdir.BzrDir.open_containing_tree_or_branch(file_list[0])
2022
2024
    add_cleanup(b.lock_read().unlock)
2023
2025
    # XXX: It's damn messy converting a list of paths to relative paths when
2029
2031
    # case of running log in a nested directory, assuming paths beyond the
2030
2032
    # first one haven't been deleted ...
2031
2033
    if tree:
2032
 
        relpaths = [path] + tree.safe_relpath_files(file_list[1:])
 
2034
        relpaths = [path] + safe_relpath_files(tree, file_list[1:])
2033
2035
    else:
2034
2036
        relpaths = [path] + file_list[1:]
2035
2037
    info_list = []