~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

Convert callers of Branch.revision_history() to Branch.last_revision_info() where sensible.
(Wouter van Heyst, Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
    branch = working.branch
177
177
    basis = working.basis_tree()
178
178
    work_inv = working.inventory
179
 
    history = branch.revision_history()
 
179
    branch_revno, branch_last_revision = branch.last_revision_info()
180
180
    try:
181
181
        tree_last_id = working.get_parent_ids()[0]
182
182
    except IndexError:
183
183
        tree_last_id = None
184
184
 
185
 
    if len(history) and tree_last_id != history[-1]:
 
185
    if branch_revno and tree_last_id != branch_last_revision:
186
186
        tree_last_revno = branch.revision_id_to_revno(tree_last_id)
187
 
        missing_count = len(history) - tree_last_revno
 
187
        missing_count = branch_revno - tree_last_revno
188
188
        print
189
189
        print 'Working tree is out of date: missing %d revision%s.' % (
190
190
            missing_count, plural(missing_count))