l.c.vfs : package documentation

Part of lp.codehosting

A virtual filesystem for hosting Bazaar branches.
Module branchfs The Launchpad code hosting file system.
Module branchfsclient Client code for the branch filesystem endpoint.
Module hooks Implementations for the seen_new_branch_hook of BranchFileSystemClient.
Package tests No package docstring; 6/6 modules documented
Module transport Transport utilities for the codehosting system.

From the __init__.py module:

Class AsyncLaunchpadTransport Virtual transport to implement the Launchpad VFS for branches.
Class BranchFileSystemClient Wrapper for some methods of the codehosting endpoint.
Class LaunchpadServer The Server used for the public SSH codehosting service.
Function branch_id_to_path Convert the given branch ID into NN/NN/NN/NN form, where NN is a two
Function get_lp_server Create a Launchpad server.
Function get_ro_server Get a Launchpad internal server for scanning branches.
Function get_rw_server Get a server that can write to the Launchpad branch vfs.
def branch_id_to_path(branch_id):
Convert the given branch ID into NN/NN/NN/NN form, where NN is a two digit hexadecimal number.

Some filesystems are not capable of dealing with large numbers of inodes. The codehosting system has tens of thousands of branches and thus splits the branches into several directories. The Launchpad id is used in order to determine the splitting.

def get_lp_server(user_id, codehosting_endpoint_url=None, branch_url=None, seen_new_branch_hook=None, branch_transport=None):
Create a Launchpad server.
Parametersuser_idA unique database ID of the user whose branches are being served.
codehosting_endpoint_urlURL for the branch file system end-point.
hosted_directoryWhere the branches are uploaded to.
mirror_directoryWhere all Launchpad branches are mirrored.
seen_new_branch_hook
ReturnsA LaunchpadServer.
def get_ro_server():
Get a Launchpad internal server for scanning branches.
def get_rw_server(direct_database=False):
Get a server that can write to the Launchpad branch vfs.

You can only call this usefully on the codehost -- the transport this server provides are backed onto file:/// URLs.

Parametersdirect_databaseif True, use a server implementation that talks directly to the database. If False, the default, use a server implementation that talks to the internal XML-RPC server.
API Documentation for Launchpad, generated by pydoctor at 2018-10-15 00:00:04.