-=[ Mr. Bumblebee ]=-
_Indonesia_
ó
î:ïNc @@ s¤ d Z d d l m Z d d l Z d d l m Z m Z d d l m Z m Z d d l
m Z d e f d „ ƒ YZ
d e f d
„ ƒ YZ d e f d „ ƒ YZ d S(
s†
Stores are the main data-storage mechanism for Bazaar.
A store is a simple write-once container indexed by a universally
unique ID.
i ( t absolute_importN( t errorst
versionedfile( t BzrErrort UnlistableStore( t muttert
StoreErrorc B@ s e Z RS( ( t __name__t
__module__( ( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyR ) s t Storec B@ sw e Z d Z d „ Z d d „ Z d „ Z d „ Z d „ Z d d „ Z d „ Z
d d „ Z d e d „ Z
d
„ Z RS( sñ This class represents the abstract storage layout for saving information.
Files can be added, but not modified once they are in. Typically
the hash is used as the name, or something else known to be unique,
such as a UUID.
c C@ s t d ƒ ‚ d S( Ns# Children should define their length( t NotImplementedError( t self( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyt __len__5 s c C@ s
t ‚ d S( s} Returns a file reading from a particular entry.
If suffix is present, retrieve the named suffix for fileid.
N( R
( R t fileidt suffix( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyt get8 s c C@ s
t ‚ d S( s, DEPRECATED. Please use .get(fileid) instead.N( R
( R R
( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyt __getitem__? s c C@ s
t ‚ d S( N( R
( R ( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyt __iter__C s c C@ s t d ƒ ‚ d S( sA Add a file object f to the store accessible from the given fileids= Children of Store must define their method of adding entries.N( R
( R t fR
( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyt addF s c C@ s
t ‚ d S( s™ Return True or false for the presence of fileid in the store.
suffix, if present, is a per file suffix, i.e. for digital signature
data.N( R
( R R
R ( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyt has_idJ s c C@ s t | d d ƒ d k S( s/ Return True if this store is able to be listed.R N( t getattrt None( R ( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyt listableQ s c C@ s¡ | j ƒ s t | ƒ ‚ n g } xC t | ƒ D]5 \ } } | rV | j d | | ƒ n | j | ƒ q. W| rz | j ƒ n t d | ƒ | j | | d | ƒd S( s0 Copy all the file ids from store_from into self.s
listing filess copy_all ids: %rt pbN( R R t enumeratet updatet appendt clearR t
copy_multi( R t
store_fromR t idst countt file_id( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyt copy_all_idsU s
c C@ s | r | j d ƒ n t ƒ } d } xØ | D]Ð } | d 7} | j | ƒ rQ q, n y~ | j | d | | ƒ x? | j D]4 } y | j | | | | ƒ Wqt t k
r§ qt Xqt W| rÎ | j d | t | ƒ ƒ n Wq, t k
rû | rõ | j | ƒ qü ‚ q, Xq, W| r| j ƒ n | | f S( sm Copy texts for ids from other into self.
If an id is present in self, it is skipped. A count of copied
ids is returned, which may be less than len(ids).
:param other: Another Store object
:param ids: A list of entry ids to be copied
:param pb: A ProgressTask object, if none is given, the default will be created.
:param permit_failure: Allow missing entries to be ignored
:return: (n_copied, [failed]) The number of entries copied successfully,
followed by a list of entries which could not be copied (because they
were missing)
s preparing to copyi i t copyN(
R t setR t _copy_oneR t _suffixest KeyErrort lenR R ( R t otherR R t permit_failuret failedR R
R ( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyR c s0
c C@ s6 t d | ƒ | j | | ƒ } | j | | | ƒ d S( s
Most generic copy-one object routine.
Subclasses can override this to provide an optimised
copy between their own instances. Such overriden routines
should call this if they have no optimised facility for a
specific 'other'.
s Store._copy_one: %rN( R R R ( R R
R R) R R ( ( s9 /usr/lib/python2.7/dist-packages/bzrlib/store/__init__.pyR% ‹ s
N( R R t __doc__R R R R R R R R R"