[Pkg-bazaar-commits] ./bzr/unstable r952: - bzr update-hashes shows some stats on what it did

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:21:33 UTC 2009


------------------------------------------------------------
revno: 952
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Thu 2005-07-21 18:32:13 -0300
message:
  - bzr update-hashes shows some stats on what it did
modified:
  bzrlib/commands.py
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2005-07-20 17:31:25 +0000
+++ b/bzrlib/commands.py	2005-07-21 21:32:13 +0000
@@ -1258,14 +1258,21 @@
     hidden = True
     def run(self):
         from bzrlib.hashcache import HashCache
+        import os
 
         c = HashCache('.')
         c.read()
-        for name in c._cache:
-            c.get_sha1(name)
+        c.refresh_all()
             
-        
+        print '%6d stats' % c.stat_count
+        print '%6d in hashcache' % len(c._cache)
+        print '%6d files gone' % c.gone_count
+        print '%6d hashes updated' % c.miss_count
+        print '%6d files changed too recently to cache' % c.danger_count
 
+        if c.needs_write:
+            c.write()
+            
 
 
 class cmd_upgrade(Command):



More information about the Pkg-bazaar-commits mailing list