l.c.i.c.IBranchFileSystem(Interface) : interface documentation

Part of lp.code.interfaces.codehosting View In Hierarchy

Known implementations: lp.code.xmlrpc.codehosting.BranchFileSystem

An interface for dealing with hosted branches in Launchpad.

Published at branchfilesystem.

The code hosting service uses this to register branches, to retrieve information about a user's branches, and to update their status.

Method createBranch Register a new hosted branch in Launchpad.
Method requestMirror Mark a branch as needing to be mirrored.
Method translatePath Translate 'path' so that the codehosting transport can access it.
def createBranch(login_id, branch_path):
Register a new hosted branch in Launchpad.

This is called by the bazaar.launchpad.net server when a user pushes a new branch to it. See also https://launchpad.canonical.com/SupermirrorFilesystemHierarchy.

Parameterslogin_idthe person ID of the user creating the branch.
branch_paththe path of the branch to be created. This should be a URL-escaped string representing an absolute path.
Returnsthe ID for the new branch or a Fault if the branch cannot be created.
def requestMirror(loginID, branchID):
Mark a branch as needing to be mirrored.
ParametersloginIDthe person ID of the user requesting the mirror.
branchIDa branch ID.
def translatePath(requester_id, path):
Translate 'path' so that the codehosting transport can access it.
Parametersrequester_idthe database ID of the person requesting the path translation.
paththe path being translated. This should be a URL escaped string representing an absolute path.
Returns(transport_type, transport_parameters, path_in_transport) where 'transport_type' is one of BRANCH_TRANSPORT or CONTROL_TRANSPORT, 'transport_parameters' is a dict of data that the client can use to construct the transport and 'path_in_transport' is a path relative to that transport. e.g. (BRANCH_TRANSPORT, {'id': 3, 'writable': False}, '.bzr/README').
RaisesPathTranslationErrorif 'path' cannot be translated.
InvalidPathif 'path' is known to be invalid.
PermissionDeniedif the requester cannot see the branch.
API Documentation for Launchpad, generated by pydoctor at 2010-04-27 00:00:13.