~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Shannon Weyrick
  • Date: 2011-11-04 13:40:04 UTC
  • mfrom: (6238 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6256.
  • Revision ID: weyrick@mozek.us-20111104134004-033t2wqhc3ydzm0a
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
lazy_import(globals(), """
66
66
 
67
67
from bzrlib import (
68
 
    bzrdir,
69
68
    config,
 
69
    controldir,
70
70
    diff,
71
71
    errors,
72
72
    foreign,
105
105
    last_ie = None
106
106
    last_path = None
107
107
    revno = 1
108
 
    for revision_id in branch.revision_history():
 
108
    graph = branch.repository.get_graph()
 
109
    history = list(graph.iter_lefthand_ancestry(branch.last_revision(),
 
110
        [_mod_revision.NULL_REVISION]))
 
111
    for revision_id in reversed(history):
109
112
        this_inv = branch.repository.get_inventory(revision_id)
110
113
        if this_inv.has_id(file_id):
111
114
            this_ie = this_inv[file_id]
1796
1799
        return self.get(name)(*args, **kwargs)
1797
1800
 
1798
1801
    def get_default(self, branch):
1799
 
        return self.get(branch.get_config().log_format())
 
1802
        c = branch.get_config_stack()
 
1803
        return self.get(c.get('log_format'))
1800
1804
 
1801
1805
 
1802
1806
log_formatter_registry = LogFormatterRegistry()
2025
2029
      branch will be read-locked.
2026
2030
    """
2027
2031
    from builtins import _get_revision_range
2028
 
    tree, b, path = bzrdir.BzrDir.open_containing_tree_or_branch(file_list[0])
 
2032
    tree, b, path = controldir.ControlDir.open_containing_tree_or_branch(
 
2033
        file_list[0])
2029
2034
    add_cleanup(b.lock_read().unlock)
2030
2035
    # XXX: It's damn messy converting a list of paths to relative paths when
2031
2036
    # those paths might be deleted ones, they might be on a case-insensitive