Part of bzrlib.tests.test_hashcache View In Hierarchy
This lets us examine how old or new files would be handled, without actually having to wait for time to pass.
Method | __init__ | Create a hash cache in base dir, and set the file mode to mode. |
Method | put_file | Undocumented |
Method | pretend_to_sleep | Undocumented |
Method | _fingerprint | Undocumented |
Method | _really_sha1_file | Calculate the SHA1 of a file by reading the full text |
Method | _cutoff_time | Return cutoff time. |
Inherited from HashCache:
Method | cache_file_name | Undocumented |
Method | clear | Discard all cached information. |
Method | scan | Scan all files and remove entries where the cache entry is obsolete. |
Method | get_sha1 | Return the sha1 of a file. |
Method | write | Write contents of cache to file. |
Method | read | Reinstate cache from file. |
Parameters | content_filter_stack_provider | a function that takes a path (relative to the top of the tree) and a file-id as parameters and returns a stack of ContentFilters. If None, no content filtering is performed. |
Files modified more recently than this time are at risk of being undetectably modified and so can't be cached.