~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/check.py

  • Committer: mbp at sourcefrog
  • Date: 2005-04-13 04:56:45 UTC
  • Revision ID: mbp@sourcefrog.net-20050413045645-6f0a77d87a206746
- Better progress and completion indicator from check command

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
def check(branch, progress=True):
31
31
    out = sys.stdout
32
32
 
 
33
    # TODO: factor out
 
34
    if not (hasattr(out, 'isatty') and out.isatty()):
 
35
        progress=False
 
36
 
33
37
    if progress:
34
38
        def p(m):
35
39
            mutter('checking ' + m)
120
124
    p('done')
121
125
    if progress:
122
126
        print 
123
 
 
 
127
    print 'checked %d revisions, %d file texts' % (revcount, len(checked_texts))
124
128