~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Gordon Tyler
  • Date: 2010-05-03 04:51:58 UTC
  • mto: This revision was merged to the branch mainline in revision 5207.
  • Revision ID: gordon@doxxx.net-20100503045158-q9smvxm7oelm8nm5
Fixed preservation of existing line endings and added tests for that and Unicode handling.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1930
1930
        lf.log_revision(lr)
1931
1931
 
1932
1932
 
1933
 
def _get_info_for_log_files(revisionspec_list, file_list, add_cleanup):
 
1933
def _get_info_for_log_files(revisionspec_list, file_list):
1934
1934
    """Find file-ids and kinds given a list of files and a revision range.
1935
1935
 
1936
1936
    We search for files at the end of the range. If not found there,
1940
1940
    :param file_list: the list of paths given on the command line;
1941
1941
      the first of these can be a branch location or a file path,
1942
1942
      the remainder must be file paths
1943
 
    :param add_cleanup: When the branch returned is read locked,
1944
 
      an unlock call will be queued to the cleanup.
1945
1943
    :return: (branch, info_list, start_rev_info, end_rev_info) where
1946
1944
      info_list is a list of (relative_path, file_id, kind) tuples where
1947
1945
      kind is one of values 'directory', 'file', 'symlink', 'tree-reference'.
1949
1947
    """
1950
1948
    from builtins import _get_revision_range, safe_relpath_files
1951
1949
    tree, b, path = bzrdir.BzrDir.open_containing_tree_or_branch(file_list[0])
1952
 
    add_cleanup(b.lock_read().unlock)
 
1950
    b.lock_read()
1953
1951
    # XXX: It's damn messy converting a list of paths to relative paths when
1954
1952
    # those paths might be deleted ones, they might be on a case-insensitive
1955
1953
    # filesystem and/or they might be in silly locations (like another branch).