~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-07-21 21:32:13 UTC
  • Revision ID: mbp@sourcefrog.net-20050721213213-c6ac0e8b06eaad0f
- bzr update-hashes shows some stats on what it did

Show diffs side-by-side

added added

removed removed

Lines of Context:
1258
1258
    hidden = True
1259
1259
    def run(self):
1260
1260
        from bzrlib.hashcache import HashCache
 
1261
        import os
1261
1262
 
1262
1263
        c = HashCache('.')
1263
1264
        c.read()
1264
 
        for name in c._cache:
1265
 
            c.get_sha1(name)
 
1265
        c.refresh_all()
1266
1266
            
1267
 
        
 
1267
        print '%6d stats' % c.stat_count
 
1268
        print '%6d in hashcache' % len(c._cache)
 
1269
        print '%6d files gone' % c.gone_count
 
1270
        print '%6d hashes updated' % c.miss_count
 
1271
        print '%6d files changed too recently to cache' % c.danger_count
1268
1272
 
 
1273
        if c.needs_write:
 
1274
            c.write()
 
1275
            
1269
1276
 
1270
1277
 
1271
1278
class cmd_upgrade(Command):