~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Patch Queue Manager
  • Date: 2011-10-06 08:34:03 UTC
  • mfrom: (6191.2.1 843900-url-nameerror)
  • Revision ID: pqm@pqm.ubuntu.com-20111006083403-jnsw0exlirg01aed
(mbp) error message without traceback on invalid ubuntu/debian url (bug
 843900) (Martin Pool)

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,
68
69
    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
 
    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):
 
108
    for revision_id in branch.revision_history():
112
109
        this_inv = branch.repository.get_inventory(revision_id)
113
110
        if this_inv.has_id(file_id):
114
111
            this_ie = this_inv[file_id]
1799
1796
        return self.get(name)(*args, **kwargs)
1800
1797
 
1801
1798
    def get_default(self, branch):
1802
 
        c = branch.get_config_stack()
1803
 
        return self.get(c.get('log_format'))
 
1799
        return self.get(branch.get_config().log_format())
1804
1800
 
1805
1801
 
1806
1802
log_formatter_registry = LogFormatterRegistry()
2029
2025
      branch will be read-locked.
2030
2026
    """
2031
2027
    from builtins import _get_revision_range
2032
 
    tree, b, path = controldir.ControlDir.open_containing_tree_or_branch(
2033
 
        file_list[0])
 
2028
    tree, b, path = bzrdir.BzrDir.open_containing_tree_or_branch(file_list[0])
2034
2029
    add_cleanup(b.lock_read().unlock)
2035
2030
    # XXX: It's damn messy converting a list of paths to relative paths when
2036
2031
    # those paths might be deleted ones, they might be on a case-insensitive