b.t.t.FakeHashCache(HashCache) : class documentation

Part of bzrlib.tests.test_hashcache View In Hierarchy

Hashcache that consults a fake clock rather than the real one.

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.
def __init__(self):
Create a hash cache in base dir, and set the file mode to mode.
Parameterscontent_filter_stack_providera 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.
def put_file(self, filename, file_contents):
Undocumented
def _fingerprint(self, abspath, fs=None):
Undocumented
def _really_sha1_file(self, abspath, filters):
Calculate the SHA1 of a file by reading the full text
def _cutoff_time(self):
Return cutoff time.

Files modified more recently than this time are at risk of being undetectably modified and so can't be cached.

def pretend_to_sleep(self, secs):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2014-11-27 00:02:01.