~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-13 00:26:41 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101013002641-9tlh9k89mlj1666m
Keep docs-plain working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
    diff,
71
71
    errors,
72
72
    foreign,
 
73
    osutils,
73
74
    repository as _mod_repository,
74
75
    revision as _mod_revision,
75
76
    revisionspec,
85
86
    format_date,
86
87
    format_date_with_offset_in_original_timezone,
87
88
    get_terminal_encoding,
88
 
    re_compile_checked,
89
89
    terminal_width,
90
90
    )
91
91
from bzrlib.symbol_versioning import (
432
432
        else:
433
433
            specific_files = None
434
434
        s = StringIO()
 
435
        path_encoding = osutils.get_diff_header_encoding()
435
436
        diff.show_diff_trees(tree_1, tree_2, s, specific_files, old_label='',
436
 
            new_label='')
 
437
            new_label='', path_encoding=path_encoding)
437
438
        return s.getvalue()
438
439
 
439
440
    def _create_log_revision_iterator(self):
809
810
    """
810
811
    if search is None:
811
812
        return log_rev_iterator
812
 
    searchRE = re_compile_checked(search, re.IGNORECASE,
813
 
            'log message filter')
 
813
    searchRE = re.compile(search, re.IGNORECASE)
814
814
    return _filter_message_re(searchRE, log_rev_iterator)
815
815
 
816
816
 
2017
2017
      kind is one of values 'directory', 'file', 'symlink', 'tree-reference'.
2018
2018
      branch will be read-locked.
2019
2019
    """
2020
 
    from builtins import _get_revision_range, safe_relpath_files
 
2020
    from builtins import _get_revision_range
2021
2021
    tree, b, path = bzrdir.BzrDir.open_containing_tree_or_branch(file_list[0])
2022
2022
    add_cleanup(b.lock_read().unlock)
2023
2023
    # XXX: It's damn messy converting a list of paths to relative paths when
2029
2029
    # case of running log in a nested directory, assuming paths beyond the
2030
2030
    # first one haven't been deleted ...
2031
2031
    if tree:
2032
 
        relpaths = [path] + safe_relpath_files(tree, file_list[1:])
 
2032
        relpaths = [path] + tree.safe_relpath_files(file_list[1:])
2033
2033
    else:
2034
2034
        relpaths = [path] + file_list[1:]
2035
2035
    info_list = []