Part of lp.codehosting.vfs View In Hierarchy
This server provides a VFS that backs onto a transport that stores branches by id. The TransportDispatch object takes care of showing a writeable or read-only view of each branch as appropriate.
In addition to basic VFS operations, this server provides operations for
creating a branch and requesting for a branch to be mirrored. The
AsyncLaunchpadTransport, has hooks in certain
filesystem-level operations to trigger these.
|Method||createBranch||Make a new directory for the given virtual URL fragment.|
|Method||branchChanged||Notify Launchpad of a change to the a branch.|
|Method||_normalize_stacked_on_url||Normalize and return the stacked-on location of
Inherited from _BaseLaunchpadServer:
|Method||get_url||Return the URL of this server.|
|Method||_transportFactory||Create a transport for this server pointing at
_BaseLaunchpadServer for more information.
|Parameters||codehosting_api||An object that has 'createBranch' and 'branchChanged' methods in addition to a 'translatePath' method. These methods should return Deferreds. XXX: JonathanLange 2008-11-19: Specify this interface better.|
|user_id||The database ID of the user to connect as.|
|branch_transport||A Bazaar |
|seen_new_branch_hook||A callable that will be called once for each branch accessed via this server.|
virtual_url_fragment is a branch directory, create the branch in
the database, then create a matching directory on the backing
|Parameters||virtual_url_fragment||A virtual path to be translated.|
|PermissionDenied||If the branch cannot be created in the database. This might indicate that the branch already exists, or that its creation is forbidden by a policy.|
|Fault||If the XML-RPC server raises errors.|
In the common case,
branch will either be unstacked or stacked on a
relative path, in which case this is very easy: just return the
branch is stacked on the absolute URL of another Launchpad
branch, we normalize this to a relative path (mutating the branch) and
return the relative path.
branch is stacked on some other absolute URL we don't recognise,
we just return that and rely on the
branchChanged XML-RPC method
recording a complaint in the appropriate place.
This method tries hard to not exit via an exception, because the client side experience is not good in that case. Instead, log.err() is called, which will result in an OOPS being logged.
|Parameters||virtual_url_fragment||A url fragment that points to a path owned by a branch.|