/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Parth Malwankar
  • Date: 2010-05-13 06:54:21 UTC
  • mfrom: (5225 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5241.
  • Revision ID: parth.malwankar@gmail.com-20100513065421-bde255i4ga5o3oqe
merged in changes from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1993
1993
        lf.log_revision(lr)
1994
1994
 
1995
1995
 
1996
 
def _get_info_for_log_files(revisionspec_list, file_list):
 
1996
def _get_info_for_log_files(revisionspec_list, file_list, add_cleanup):
1997
1997
    """Find file-ids and kinds given a list of files and a revision range.
1998
1998
 
1999
1999
    We search for files at the end of the range. If not found there,
2003
2003
    :param file_list: the list of paths given on the command line;
2004
2004
      the first of these can be a branch location or a file path,
2005
2005
      the remainder must be file paths
 
2006
    :param add_cleanup: When the branch returned is read locked,
 
2007
      an unlock call will be queued to the cleanup.
2006
2008
    :return: (branch, info_list, start_rev_info, end_rev_info) where
2007
2009
      info_list is a list of (relative_path, file_id, kind) tuples where
2008
2010
      kind is one of values 'directory', 'file', 'symlink', 'tree-reference'.
2010
2012
    """
2011
2013
    from builtins import _get_revision_range, safe_relpath_files
2012
2014
    tree, b, path = bzrdir.BzrDir.open_containing_tree_or_branch(file_list[0])
2013
 
    b.lock_read()
 
2015
    add_cleanup(b.lock_read().unlock)
2014
2016
    # XXX: It's damn messy converting a list of paths to relative paths when
2015
2017
    # those paths might be deleted ones, they might be on a case-insensitive
2016
2018
    # filesystem and/or they might be in silly locations (like another branch).