b.r.RemoteRepository(_RpcHelper, lock._RelockDebugMixin, controldir.ControlComponent) : class documentation

Part of bzrlib.remote View In Hierarchy

Repository accessed over rpc.

For the moment most operations are performed using local transport-backed Repository objects.

Method __init__ Create a RemoteRepository instance.
Method user_transport Undocumented
Method control_transport Undocumented
Method __str__ Undocumented
Method abort_write_group Complete a write group on the decorated repository.
Method chk_bytes Decorate the real repository for now.
Method commit_write_group Complete a write group on the decorated repository.
Method resume_write_group Undocumented
Method suspend_write_group Undocumented
Method get_missing_parent_inventories Undocumented
Method get_rev_id_for_revno See Repository.get_rev_id_for_revno.
Method find_text_key_references Find the text key references within the repository.
Method get_file_graph Undocumented
Method has_revision True if this repository has a copy of the revision.
Method has_revisions Probe to find out the presence of multiple revisions.
Method has_same_location Undocumented
Method get_graph Return the graph for this repository format
Method get_known_graph_ancestry Return the known graph for a set of revision ids and their ancestors.
Method gather_stats See Repository.gather_stats().
Method find_branches See Repository.find_branches().
Method get_physical_lock_status See Repository.get_physical_lock_status().
Method is_in_write_group Return True if there is an open write group.
Method is_locked Undocumented
Method is_shared See Repository.is_shared().
Method is_write_locked Undocumented
Method lock_read Lock the repository for read operations.
Method lock_write Undocumented
Method leave_lock_in_place Undocumented
Method dont_leave_lock_in_place Undocumented
Method start_write_group Start a write group on the decorated repository.
Method unlock Undocumented
Method break_lock Undocumented
Method sprout Undocumented
Method revision_tree Undocumented
Method get_serializer_format Undocumented
Method get_commit_builder Undocumented
Method add_fallback_repository Add a repository to use for looking up data not held locally.
Method add_inventory Undocumented
Method add_inventory_by_delta Undocumented
Method add_revision Undocumented
Method get_inventory Undocumented
Method iter_inventories Undocumented
Method get_revision Undocumented
Method get_transaction Undocumented
Method clone Undocumented
Method make_working_trees See Repository.make_working_trees
Method refresh_data Re-read any data needed to synchronise with disk.
Method revision_ids_to_search_result Convert a set of revision ids to a graph SearchResult.
Method search_missing_revision_ids Return the revision ids that other has that this does not.
Method fetch Undocumented
Method create_bundle Undocumented
Method get_ancestry Undocumented
Method fileids_altered_by_revision_ids Undocumented
Method iter_files_bytes See Repository.iter_file_bytes.
Method get_cached_parent_map See bzrlib.CachingParentsProvider.get_cached_parent_map
Method get_parent_map See bzrlib.Graph.get_parent_map().
Method get_signature_text Undocumented
Method reconcile Undocumented
Method all_revision_ids Undocumented
Method get_deltas_for_revisions Undocumented
Method get_revision_delta Undocumented
Method revision_trees Undocumented
Method get_revision_reconcile Undocumented
Method check Undocumented
Method copy_content_into Undocumented
Method inventories Decorate the real repository for now.
Method pack Compress the data within the repository.
Method revisions Decorate the real repository for now.
Method set_make_working_trees Undocumented
Method signatures Decorate the real repository for now.
Method sign_revision Undocumented
Method texts Decorate the real repository for now.
Method get_revisions Undocumented
Method supports_rich_root Undocumented
Method iter_reverse_revision_history Undocumented
Method store_revision_signature Undocumented
Method add_signature_text Undocumented
Method has_signature_for_revision_id Undocumented
Method item_keys_introduced_by Undocumented
Method autopack Undocumented
Method _get_rev_id_for_revno_vfs Undocumented
Method _ensure_real Ensure that there is a _real_repository set.
Method _translate_error Undocumented
Method _generate_text_key_index Generate a new text key index for the repository.
Method _get_revision_graph Private method for using with old (< 1.2) servers to fallback.
Method _get_sink See Repository._get_sink().
Method _get_source Return a source for streaming from this repository.
Method _has_same_fallbacks Returns true if the repositories have the same fallbacks.
Method _warn_if_deprecated Undocumented
Method _remote_lock_write Undocumented
Method _set_real_repository Set the _real_repository for this repository.
Method _unlock Undocumented
Method _get_tarball Return a TemporaryFile containing a repository tarball.
Method _check_fallback_repository Check that this repository can fallback to repository safely.
Method _get_versioned_file_checker Undocumented
Method _get_parent_map_rpc Helper for get_parent_map that performs the RPC.
Method _get_inventory_xml Undocumented
Method _copy_repository_tarball Undocumented
Method _serializer Undocumented
Method _find_inconsistent_revision_parents Undocumented
Method _check_for_inconsistent_revision_parents Undocumented
Method _make_parents_provider Undocumented
Method _serialise_search_recipe Serialise a graph search recipe.
Method _serialise_search_result Undocumented

Inherited from _RpcHelper:

Method _call Undocumented
Method _call_expecting_body Undocumented
Method _call_with_body_bytes Undocumented
Method _call_with_body_bytes_expecting_body Undocumented

Inherited from _RelockDebugMixin:

Method _note_lock Undocumented

Inherited from ControlComponent:

Method control_url Undocumented
Method user_url Undocumented
def __init__(self, remote_bzrdir, format, real_repository=None, _client=None):
Create a RemoteRepository instance.
Parametersremote_bzrdirThe bzrdir hosting this repository.
formatThe RemoteFormat object to use.
real_repositoryIf not None, a local implementation of the repository logic for the repository, usually accessing the data via the VFS.
_clientPrivate testing parameter - override the smart client to be used by the repository.
@property
def user_transport(self):
Undocumented
@property
def control_transport(self):
Undocumented
def __str__(self):
Undocumented
def abort_write_group(self, suppress_errors=False):
Complete a write group on the decorated repository.

Smart methods perform operations in a single step so this API is not really applicable except as a compatibility thunk for older plugins that don't use e.g. the CommitBuilder facility.

Parameterssuppress_errorssee Repository.abort_write_group.
@property
def chk_bytes(self):
Decorate the real repository for now.

In the long term a full blown network facility is needed to avoid creating a real repository object locally.

def commit_write_group(self):
Complete a write group on the decorated repository.

Smart methods perform operations in a single step so this API is not really applicable except as a compatibility thunk for older plugins that don't use e.g. the CommitBuilder facility.

def resume_write_group(self, tokens):
Undocumented
def suspend_write_group(self):
Undocumented
def get_missing_parent_inventories(self, check_for_missing_texts=True):
Undocumented
def _get_rev_id_for_revno_vfs(self, revno, known_pair):
Undocumented
def get_rev_id_for_revno(self, revno, known_pair):
See Repository.get_rev_id_for_revno.
def _ensure_real(self):
Ensure that there is a _real_repository set.

Used before calls to self._real_repository.

Note that _ensure_real causes many roundtrips to the server which are not desirable, and prevents the use of smart one-roundtrip RPC's to perform complex operations (such as accessing parent data, streaming revisions etc). Adding calls to _ensure_real should only be done when bringing up new functionality, adding fallbacks for smart methods that require a fallback path, and never to replace an existing smart method invocation. If in doubt chat to the bzr network team.

def _translate_error(self, err, **context):
Undocumented
def find_text_key_references(self):
Find the text key references within the repository.
ReturnsA dictionary mapping text keys ((fileid, revision_id) tuples) to whether they were referred to by the inventory of the revision_id that they contain. The inventory texts from all present revision ids are assessed to generate this report.
def _generate_text_key_index(self):
Generate a new text key index for the repository.

This is an expensive function that will take considerable time to run.

ReturnsA dict mapping (file_id, revision_id) tuples to a list of parents, also (file_id, revision_id) tuples.
def _get_revision_graph(self, revision_id):
Private method for using with old (< 1.2) servers to fallback.
def _get_sink(self):
See Repository._get_sink().
def _get_source(self, to_format):
Return a source for streaming from this repository.
@needs_read_lock
def get_file_graph(self):
Undocumented
@needs_read_lock
def has_revision(self, revision_id):
True if this repository has a copy of the revision.
@needs_read_lock
def has_revisions(self, revision_ids):
Probe to find out the presence of multiple revisions.
Parametersrevision_idsAn iterable of revision_ids.
ReturnsA set of the revision_ids that were present.
def _has_same_fallbacks(self, other_repo):
Returns true if the repositories have the same fallbacks.
def has_same_location(self, other):
Undocumented
def get_graph(self, other_repository=None):
Return the graph for this repository format
@needs_read_lock
def get_known_graph_ancestry(self, revision_ids):
Return the known graph for a set of revision ids and their ancestors.
def gather_stats(self, revid=None, committers=None):
See Repository.gather_stats().
def find_branches(self, using=False):
See Repository.find_branches().
def get_physical_lock_status(self):
See Repository.get_physical_lock_status().
def is_in_write_group(self):
Return True if there is an open write group.

write groups are only applicable locally for the smart server..

def is_locked(self):
Undocumented
def is_shared(self):
See Repository.is_shared().
def is_write_locked(self):
Undocumented
def _warn_if_deprecated(self, branch=None):
Undocumented
def lock_read(self):
Lock the repository for read operations.
ReturnsA bzrlib.lock.LogicalLockResult.
def _remote_lock_write(self, token):
Undocumented
def lock_write(self, token=None, _skip_rpc=False):
Undocumented
def leave_lock_in_place(self):
Undocumented
def dont_leave_lock_in_place(self):
Undocumented
def _set_real_repository(self, repository):
Set the _real_repository for this repository.
ParametersrepositoryThe repository to fallback to for non-hpss implemented operations.
def start_write_group(self):
Start a write group on the decorated repository.

Smart methods perform operations in a single step so this API is not really applicable except as a compatibility thunk for older plugins that don't use e.g. the CommitBuilder facility.

def _unlock(self, token):
Undocumented
@only_raises(errors.LockNotHeld, errors.LockBroken)
def unlock(self):
Undocumented
def break_lock(self):
Undocumented
def _get_tarball(self, compression):
Return a TemporaryFile containing a repository tarball.

Returns None if the server does not support sending tarballs.

def sprout(self, to_bzrdir, revision_id=None):
Undocumented
def revision_tree(self, revision_id):
Undocumented
def get_serializer_format(self):
Undocumented
def get_commit_builder(self, branch, parents, config, timestamp=None, timezone=None, committer=None, revprops=None, revision_id=None, lossy=False):
Undocumented
def add_fallback_repository(self, repository):
Add a repository to use for looking up data not held locally.
ParametersrepositoryA repository.
def _check_fallback_repository(self, repository):
Check that this repository can fallback to repository safely.

Raise an error if not.

ParametersrepositoryA repository to fallback to.
def add_inventory(self, revid, inv, parents):
Undocumented
def add_inventory_by_delta(self, basis_revision_id, delta, new_revision_id, parents, basis_inv=None, propagate_caches=False):
Undocumented
def add_revision(self, rev_id, rev, inv=None, config=None):
Undocumented
@needs_read_lock
def get_inventory(self, revision_id):
Undocumented
def iter_inventories(self, revision_ids, ordering=None):
Undocumented
@needs_read_lock
def get_revision(self, revision_id):
Undocumented
def get_transaction(self):
Undocumented
@needs_read_lock
def clone(self, a_bzrdir, revision_id=None):
Undocumented
def make_working_trees(self):
See Repository.make_working_trees
def refresh_data(self):
Re-read any data needed to synchronise with disk.

This method is intended to be called after another repository instance (such as one used by a smart server) has inserted data into the repository. On all repositories this will work outside of write groups. Some repository formats (pack and newer for bzrlib native formats) support refresh_data inside write groups. If called inside a write group on a repository that does not support refreshing in a write group IsInWriteGroupError will be raised.

def revision_ids_to_search_result(self, result_set):
Convert a set of revision ids to a graph SearchResult.
@needs_read_lock
def search_missing_revision_ids(self, other, revision_id=symbol_versioning.DEPRECATED_PARAMETER, find_ghosts=True, revision_ids=None, if_present_ids=None, limit=None):
Return the revision ids that other has that this does not.

These are returned in topological order.

revision_id: only return revision ids included by revision_id.

def fetch(self, source, revision_id=None, find_ghosts=False, fetch_spec=None):
Undocumented
def create_bundle(self, target, base, fileobj, format=None):
Undocumented
@needs_read_lock
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
def get_ancestry(self, revision_id, topo_sorted=True):
Undocumented
def fileids_altered_by_revision_ids(self, revision_ids):
Undocumented
def _get_versioned_file_checker(self, revisions, revision_versions_cache):
Undocumented
def iter_files_bytes(self, desired_files):
See Repository.iter_file_bytes.
def get_cached_parent_map(self, revision_ids):
See bzrlib.CachingParentsProvider.get_cached_parent_map
def get_parent_map(self, revision_ids):
See bzrlib.Graph.get_parent_map().
def _get_parent_map_rpc(self, keys):
Helper for get_parent_map that performs the RPC.
@needs_read_lock
def get_signature_text(self, revision_id):
Undocumented
@needs_read_lock
def _get_inventory_xml(self, revision_id):
Undocumented
def reconcile(self, other=None, thorough=False):
Undocumented
def all_revision_ids(self):
Undocumented
@needs_read_lock
def get_deltas_for_revisions(self, revisions, specific_fileids=None):
Undocumented
@needs_read_lock
def get_revision_delta(self, revision_id, specific_fileids=None):
Undocumented
@needs_read_lock
def revision_trees(self, revision_ids):
Undocumented
@needs_read_lock
def get_revision_reconcile(self, revision_id):
Undocumented
@needs_read_lock
def check(self, revision_ids=None, callback_refs=None, check_repo=True):
Undocumented
def copy_content_into(self, destination, revision_id=None):
Undocumented
def _copy_repository_tarball(self, to_bzrdir, revision_id=None):
Undocumented
@property
def inventories(self):
Decorate the real repository for now.

In the long term a full blown network facility is needed to avoid creating a real repository object locally.

@needs_write_lock
def pack(self, hint=None, clean_obsolete_packs=False):
Compress the data within the repository.

This is not currently implemented within the smart server.

@property
def revisions(self):
Decorate the real repository for now.

In the short term this should become a real object to intercept graph lookups.

In the long term a full blown network facility is needed.

def set_make_working_trees(self, new_value):
Undocumented
@property
def signatures(self):
Decorate the real repository for now.

In the long term a full blown network facility is needed to avoid creating a real repository object locally.

@needs_write_lock
def sign_revision(self, revision_id, gpg_strategy):
Undocumented
@property
def texts(self):
Decorate the real repository for now.

In the long term a full blown network facility is needed to avoid creating a real repository object locally.

@needs_read_lock
def get_revisions(self, revision_ids):
Undocumented
def supports_rich_root(self):
Undocumented
@symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
def iter_reverse_revision_history(self, revision_id):
Undocumented
@property
def _serializer(self):
Undocumented
def store_revision_signature(self, gpg_strategy, plaintext, revision_id):
Undocumented
def add_signature_text(self, revision_id, signature):
Undocumented
def has_signature_for_revision_id(self, revision_id):
Undocumented
def item_keys_introduced_by(self, revision_ids, _files_pb=None):
Undocumented
def _find_inconsistent_revision_parents(self, revisions_iterator=None):
Undocumented
def _check_for_inconsistent_revision_parents(self):
Undocumented
def _make_parents_provider(self, other=None):
Undocumented
def _serialise_search_recipe(self, recipe):
Serialise a graph search recipe.
ParametersrecipeA search recipe (start, stop, count).
ReturnsSerialised bytes.
def _serialise_search_result(self, search_result):
Undocumented
def autopack(self):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.