b.r.RemoteBzrDir(_mod_bzrdir.BzrDir, _RpcHelper) : class documentation

Part of bzrlib.remote View In Hierarchy

Control directory on a remote server, accessed via bzr:// or similar.
Method __init__ Construct a RemoteBzrDir.
Method __repr__ Undocumented
Method break_lock Invoke break_lock on the first object in the bzrdir.
Method cloning_metadir Produce a metadir suitable for cloning or sprouting with.
Method create_repository Create a new repository in this control directory.
Method destroy_repository See BzrDir.destroy_repository
Method create_branch Create a branch in this ControlDir.
Method destroy_branch See BzrDir.destroy_branch
Method create_workingtree Create a working tree at this ControlDir.
Method find_branch_format Find the branch 'format' for this bzrdir.
Method get_branch_reference See BzrDir.get_branch_reference().
Method open_branch Open the branch object at this ControlDir if one is present.
Method open_repository Open the repository object at this ControlDir if one is present.
Method has_workingtree Tell if this controldir contains a working tree.
Method open_workingtree Open the workingtree object at this ControlDir if one is present.
Method get_branch_transport Get the transport for use by branch format in this BzrDir.
Method get_repository_transport Get the transport for use by repository format in this BzrDir.
Method get_workingtree_transport Get the transport for use by workingtree format in this BzrDir.
Method can_convert_format Upgrading of remote bzrdirs is not supported yet.
Method needs_format_conversion Upgrading of remote bzrdirs is not supported yet.
Method clone Clone this controldir and its contents to url verbatim.
Method _probe_bzrdir Undocumented
Method _rpc_open_2_1 Undocumented
Method _rpc_open Undocumented
Method _ensure_real Ensure that there is a _real_bzrdir set.
Method _translate_error Undocumented
Method _vfs_cloning_metadir Undocumented
Method _get_branch_reference Undocumented
Method _get_tree_branch See BzrDir._get_tree_branch().
Method _open_repo_v1 Undocumented
Method _open_repo_v2 Undocumented
Method _open_repo_v3 Undocumented
Method _path_for_remote_call Return the path to be used for this bzrdir in a remote call.
Method _get_config By default, no configuration is available.

Inherited from BzrDir:

Method check_conversion_target Check that a bzrdir as a whole can be converted to a new format.
Method clone_on_transport Clone this bzrdir and its contents to transport verbatim.
Method determine_repository_policy Return an object representing a policy to use.
Method sprout Create a copy of this controldir prepared for use as a new line of
Method generate_backup_name Undocumented
Method backup_bzrdir Backup this bzr control directory.
Method retire_bzrdir Permanently disable the bzrdir.
Method find_repository Find the repository that should be used.
Method get_config Get configuration for this BzrDir.
Method user_transport Undocumented
Method control_transport Undocumented
Method is_control_filename True if filename is the name of a path which is reserved for bzrdir's.
Class Method create Create a new BzrDir at the url 'base'.
Method _make_tail Undocumented
Method _find_or_create_repository Create a new repository if needed, returning the repository.
Method _find_source_repo Find the source branch and repo for a sprout operation.
Method _sprout Undocumented
Method _available_backup_name Find a non-existing backup file name based on base.
Method _find_containing Find something in a containing control directory.
Method _find_creation_modes Determine the appropriate modes for files and directories.
Method _get_file_mode Return Unix mode for newly created files, or None.
Method _get_dir_mode Return Unix mode for newly created directories, or None.
Method _cloning_metadir Produce a metadir suitable for cloning with.

Inherited from ControlDir (via BzrDir):

Method list_branches Return a sequence of all branches local to this control directory.
Method destroy_workingtree Destroy the working tree at this ControlDir.
Method destroy_workingtree_metadata Destroy the control files for the working tree at this ControlDir.
Method has_branch Tell if this controldir contains a branch.
Method checkout_metadir Produce a metadir suitable for checkouts of this controldir.
Method push_branch Push the source branch into this ControlDir.
Class Method find_bzrdirs Find control dirs recursively from current location.
Class Method find_branches Find all branches under a transport.
Class Method create_branch_and_repo Create a new ControlDir, Branch and Repository at the url 'base'.
Class Method create_branch_convenience Create a new ControlDir, Branch and Repository at the url 'base'.
Class Method create_standalone_workingtree Create a new ControlDir, WorkingTree, Branch and Repository at 'base'.
Class Method open_unsupported Open a branch which is not supported.
Class Method open Open an existing controldir, rooted at 'base' (url).
Class Method open_from_transport Open a controldir within a particular directory.
Class Method open_containing Open an existing branch which contains url.
Class Method open_containing_from_transport Open an existing branch which contains a_transport.base.
Class Method open_tree_or_branch Return the branch and working tree at a location.
Class Method open_containing_tree_or_branch Return the branch and working tree contained by a location.
Class Method open_containing_tree_branch_or_repository Return the working tree, branch and repo contained by a location.
Method _get_selected_branch Return the name of the branch selected by the user.

Inherited from ControlComponent (via BzrDir, ControlDir):

Method control_url Undocumented
Method user_url 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
def __init__(self, transport, format, _client=None, _force_probe=False):
Construct a RemoteBzrDir.
Parameters_clientPrivate parameter for testing. Disables probing and the use of a real bzrdir.
def __repr__(self):
Undocumented
def _probe_bzrdir(self):
Undocumented
def _rpc_open_2_1(self, path):
Undocumented
def _rpc_open(self, path):
Undocumented
def _ensure_real(self):
Ensure that there is a _real_bzrdir set.

Used before calls to self._real_bzrdir.

def _translate_error(self, err, **context):
Undocumented
def break_lock(self):
Invoke break_lock on the first object in the bzrdir.

If there is a tree, the tree is opened and break_lock() called. Otherwise, branch is tried, and finally repository.

def _vfs_cloning_metadir(self, require_stacking=False):
Undocumented
def cloning_metadir(self, require_stacking=False):
Produce a metadir suitable for cloning or sprouting with.

These operations may produce workingtrees (yes, even though they're "cloning" something that doesn't have a tree), so a viable workingtree format must be selected.

Returnsa ControlDirFormat with all component formats either set appropriately or set to None if that component should not be created.
Unknown Field: require_stackingIf True, non-stackable formats will be upgraded to similar stackable formats.
def create_repository(self, shared=False):
Create a new repository in this control directory.
ParameterssharedIf a shared repository should be created
ReturnsThe newly created repository
def destroy_repository(self):
See BzrDir.destroy_repository
def create_branch(self, name=None, repository=None, append_revisions_only=None):
Create a branch in this ControlDir.

The controldirs format will control what branch format is created. For more control see BranchFormatXX.create(a_controldir).

ParametersnameName of the colocated branch to create, None for the default branch.
append_revisions_onlyWhether this branch should only allow appending new revisions to its history.
def destroy_branch(self, name=None):
See BzrDir.destroy_branch
def create_workingtree(self, revision_id=None, from_branch=None, accelerator_tree=None, hardlink=False):
Create a working tree at this ControlDir.
Parametersrevision_idcreate it as of this revision id.
from_branchoverride controldir branch (for lightweight checkouts)
accelerator_treeA tree which can be used for retrieving file contents more quickly than the revision tree, i.e. a workingtree. The revision tree will be used for cases where accelerator_tree's content is different.
def find_branch_format(self, name=None):
Find the branch 'format' for this bzrdir.

This might be a synthetic object for e.g. RemoteBranch and SVN.

def get_branch_reference(self, name=None):
See BzrDir.get_branch_reference().
def _get_branch_reference(self):
Undocumented
def _get_tree_branch(self, name=None):
See BzrDir._get_tree_branch().
def open_branch(self, name=None, unsupported=False, ignore_fallbacks=False):
Open the branch object at this ControlDir if one is present.

If unsupported is True, then no longer supported branch formats can still be opened.

TODO: static convenience version of this?

def _open_repo_v1(self, path):
Undocumented
def _open_repo_v2(self, path):
Undocumented
def _open_repo_v3(self, path):
Undocumented
def open_repository(self):
Open the repository object at this ControlDir if one is present.

This will not follow the Branch object pointer - it's strictly a direct open facility. Most client code should use open_branch().repository to get at a repository.

TODO: static convenience version of this?

Parameters_unsupporteda private parameter, not part of the api.
def has_workingtree(self):
Tell if this controldir contains a working tree.

This will still raise an exception if the controldir has a workingtree that is remote & inaccessible.

Note: if you're going to open the working tree, you should just go ahead and try, and not ask permission first. (This method just opens the workingtree and discards it, and that's somewhat expensive.)

def open_workingtree(self, recommend_upgrade=True):
Open the workingtree object at this ControlDir if one is present.
Parametersrecommend_upgradeOptional keyword parameter, when True (the default), emit through the ui module a recommendation that the user upgrade the working tree when the workingtree being opened is old (but still fully supported).
from_branchoverride controldir branch (for lightweight checkouts)
def _path_for_remote_call(self, client):
Return the path to be used for this bzrdir in a remote call.
def get_branch_transport(self, branch_format, name=None):
Get the transport for use by branch format in this BzrDir.

Note that bzr dirs that do not support format strings will raise IncompatibleFormat if the branch format they are given has a format string, and vice versa.

If branch_format is None, the transport is returned with no checking. If it is not None, then the returned transport is guaranteed to point to an existing directory ready for use.

def get_repository_transport(self, repository_format):
Get the transport for use by repository format in this BzrDir.

Note that bzr dirs that do not support format strings will raise IncompatibleFormat if the repository format they are given has a format string, and vice versa.

If repository_format is None, the transport is returned with no checking. If it is not None, then the returned transport is guaranteed to point to an existing directory ready for use.

def get_workingtree_transport(self, workingtree_format):
Get the transport for use by workingtree format in this BzrDir.

Note that bzr dirs that do not support format strings will raise IncompatibleFormat if the workingtree format they are given has a format string, and vice versa.

If workingtree_format is None, the transport is returned with no checking. If it is not None, then the returned transport is guaranteed to point to an existing directory ready for use.

def can_convert_format(self):
Upgrading of remote bzrdirs is not supported yet.
def needs_format_conversion(self, format):
Upgrading of remote bzrdirs is not supported yet.
def clone(self, url, revision_id=None, force_new_repo=False, preserve_stacking=False):
Clone this controldir and its contents to url verbatim.
ParametersurlThe url create the clone at. If url's last component does not exist, it will be created.
revision_idThe tip revision-id to use for any branch or working tree. If not None, then the clone operation may tune itself to download less data.
force_new_repoDo not use a shared repository for the target even if one is available.
preserve_stackingWhen cloning a stacked branch, stack the new branch on top of the other branch's stacked-on branch.
def _get_config(self):
By default, no configuration is available.
API Documentation for Bazaar, generated by pydoctor at 2019-07-15 00:28:21.