b.s.v.VersionedFileStore(TransportStore) : class documentation

Part of bzrlib.store.versioned View In Hierarchy

Collection of many versioned files in a transport.
Method __init__ Undocumented
Method filename Return the path relative to the transport root.
Method __iter__ Undocumented
Method has_id See Store.has_id.
Method get_empty Get an empty weave, which implies deleting the existing one first.
Method delete Remove file_id from the store.
Method get_weave Return the VersionedFile for file_id.
Method get_weave_or_empty Return a weave, or an empty one if it doesn't exist.
Method copy_all_ids Copy all the file ids from store_from into self.
Method copy_multi Copy all the versions for multiple file_ids from from_store.
Method total_size Return (count, bytes)
Method _get Return an vanilla file stream for clients to read from.
Method _put Undocumented
Method _make_new_versionedfile Make a new versioned file.
Method _put_weave Preserved here for upgrades-to-weaves to use.

Inherited from TransportStore:

Method add Add contents of a file into the store.
Method get See Store.get().
Method __len__ Undocumented
Method __repr__ Undocumented
Method listable Return True if this store is able to be listed.
Method register_suffix Register a suffix as being expected in this store.
Method _add Actually add the file to the given location.
Method _check_fileid Undocumented
Method _id_to_names Return the names in the expected order
Method _get_name A special check, which returns the name of an existing file.
Method _iter_files_recursive Iterate through the files in the transport.
Method _relpath Undocumented

Inherited from Store (via TransportStore):

Method __getitem__ DEPRECATED. Please use .get(fileid) instead.
Method _copy_one Most generic copy-one object routine.
def __init__(self, transport, prefixed=False, precious=False, dir_mode=None, file_mode=None, versionedfile_class=None, versionedfile_kwargs={}, escaped=False):
Undocumented
def filename(self, file_id):
Return the path relative to the transport root.
def __iter__(self):
Undocumented
def has_id(self, file_id):
See Store.has_id.
def get_empty(self, file_id, transaction):
Get an empty weave, which implies deleting the existing one first.
def delete(self, file_id, transaction):
Remove file_id from the store.
def _get(self, file_id):
Return an vanilla file stream for clients to read from.

This is the body of a template method on 'get', and should be implemented by subclasses.

def _put(self, file_id, f):
Undocumented
def get_weave(self, file_id, transaction, _filename=None):
Return the VersionedFile for file_id.

:param _filename: filename that would be returned from self.filename for
file_id. This is used to reduce duplicate filename calculations when
using 'get_weave_or_empty'. FOR INTERNAL USE ONLY.
def _make_new_versionedfile(self, file_id, transaction, known_missing=False, _filename=None):
Make a new versioned file.

:param _filename: filename that would be returned from self.filename for
file_id. This is used to reduce duplicate filename calculations when
using 'get_weave_or_empty'. FOR INTERNAL USE ONLY.
def get_weave_or_empty(self, file_id, transaction):
Return a weave, or an empty one if it doesn't exist.
def _put_weave(self, file_id, weave, transaction):
Preserved here for upgrades-to-weaves to use.
def copy_all_ids(self, store_from, pb=None, from_transaction=None, to_transaction=None):
Copy all the file ids from store_from into self.
def copy_multi(self, from_store, file_ids, pb=None, from_transaction=None, to_transaction=None):
Copy all the versions for multiple file_ids from from_store.
Parametersfrom_transactionrequired current transaction in from_store.
def total_size(self):
Return (count, bytes)

This is the (compressed) size stored on disk, not the size of the content.

API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.