~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/info.py

  • Committer: Aaron Bentley
  • Date: 2006-08-08 00:11:35 UTC
  • mto: (1731.1.40 nested-trees)
  • mto: This revision was merged to the branch mainline in revision 1910.
  • Revision ID: aaron.bentley@utoronto.ca-20060808001135-ae94c12d9631f432
Avoid generating unnecessary list

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
    dir_cnt = 0
210
210
    entries = work_inv.iter_entries()
211
211
    entries.next()
212
 
    dir_cnt = len([ie for path, ie in entries if ie.kind == 'directory'])
 
212
    dir_cnt = sum(1 for path, ie in entries if ie.kind == 'directory')
213
213
    print '  %8d versioned %s' \
214
214
          % (dir_cnt,
215
215
             plural(dir_cnt, 'subdirectory', 'subdirectories'))