-=[ Mr. Bumblebee ]=-
_Indonesia_
σ
¦ξNc @@ s d d l m Z d Z d d l Z d d l Z d d l Z d d l m Z m Z m Z
m Z m Z d Z
d Z d Z d e f d YZ d S(
i ( t absolute_imports ### bzr hashcache v5
N( t
atomicfilet errorst filterst osutilst tracei i i t HashCachec B@ sz e Z d Z e Z d d d Z d Z d Z d Z d d Z
d Z d Z d Z
d Z d d
Z RS( s{ Cache for looking up file SHA-1.
Files are considered to match the cached value if the fingerprint
of the file has not changed. This includes its mtime, ctime,
device number, inode number, and size. This should catch
modifications or replacement of the file by a new one.
This may not catch modifications that do not change the file's
size and that occur within the resolution window of the
timestamps. To handle this we specifically do not cache files
which have changed since the start of the present second, since
they could undetectably change again.
This scheme may fail if the machine's clock steps backwards.
Don't do that.
This does not canonicalize the paths passed in; that should be
done by the caller.
_cache
Indexed by path, points to a two-tuple of the SHA-1 of the file.
and its fingerprint.
stat_count
number of times files have been statted
hit_count
number of times files have been retrieved from the cache, avoiding a
re-read
miss_count
number of misses (times files have been completely re-read)
c C@ s t j | | _ | j j d | _ d | _ d | _ d | _ d | _ d | _ d | _
i | _ | | _ t j | | _
| | _ d S( sI Create a hash cache in base dir, and set the file mode to mode.
:param 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.
t utf8i N( R t safe_unicodet roott encodet root_utf8t hit_countt
miss_countt
stat_countt danger_countt
removed_countt update_countt _cachet _modet _cache_file_namet _filter_provider( t selfR t cache_file_namet modet content_filter_stack_provider( ( s4 /usr/lib/python2.7/dist-packages/bzrlib/hashcache.pyt __init__Y s c C@ s | j S( N( R ( R ( ( s4 /usr/lib/python2.7/dist-packages/bzrlib/hashcache.pyR o s c C@ s"