[Pkg-bazaar-commits] ./bzr/unstable r486: - Write out statcache if any files are updated, even
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:19:18 UTC 2009
------------------------------------------------------------
revno: 486
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Thu 2005-05-12 10:54:18 +1000
message:
- Write out statcache if any files are updated, even
if their content has not changed
modified:
bzrlib/statcache.py
-------------- next part --------------
=== modified file 'bzrlib/statcache.py'
--- a/bzrlib/statcache.py 2005-05-11 02:38:03 +0000
+++ b/bzrlib/statcache.py 2005-05-12 00:54:18 +0000
@@ -197,12 +197,12 @@
dig = sha.new(file(abspath, 'rb').read()).hexdigest()
- if cacheentry == None or dig != cacheentry[1]:
- # if there was no previous entry for this file, or if the
- # SHA has changed, then update the cache
- cacheentry = (file_id, dig, path) + fp
- cache[file_id] = cacheentry
- change_cnt += 1
+ # We update the cache even if the digest has not changed from
+ # last time we looked, so that the fingerprint fields will
+ # match in future.
+ cacheentry = (file_id, dig, path) + fp
+ cache[file_id] = cacheentry
+ change_cnt += 1
mutter('statcache: statted %d files, read %d files, %d changed, %d dangerous, '
'%d in cache'
More information about the Pkg-bazaar-commits
mailing list