~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-15 11:41:51 UTC
  • mto: This revision was merged to the branch mainline in revision 5793.
  • Revision ID: jelmer@samba.org-20110415114151-lq9stx2hx3lmfu8o
Avoid the use of inventory in 'bzr info'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
    """Show missing revisions in working tree."""
222
222
    branch = working.branch
223
223
    basis = working.basis_tree()
224
 
    work_inv = working.inventory
225
224
    branch_revno, branch_last_revision = branch.last_revision_info()
226
225
    try:
227
226
        tree_last_id = working.get_parent_ids()[0]
239
238
def _show_working_stats(working, outfile):
240
239
    """Show statistics about a working tree."""
241
240
    basis = working.basis_tree()
242
 
    work_inv = working.inventory
243
241
    delta = working.changes_from(basis, want_unchanged=True)
244
242
 
245
243
    outfile.write('\n')
260
258
    outfile.write('  %8d ignored\n' % ignore_cnt)
261
259
 
262
260
    dir_cnt = 0
263
 
    for file_id in work_inv:
264
 
        if (work_inv.get_file_kind(file_id) == 'directory' and
265
 
            not work_inv.is_root(file_id)):
 
261
    root_id = working.get_root_id()
 
262
    for file_id in working:
 
263
        if (working.kind(file_id) == 'directory' and
 
264
            file_id != root_id):
266
265
            dir_cnt += 1
267
266
    outfile.write('  %8d versioned %s\n' % (dir_cnt,
268
267
        plural(dir_cnt, 'subdirectory', 'subdirectories')))