l.c.i.b.IBranchNamespace(Interface) : interface documentation

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

A namespace that a branch lives in.
Attribute name The name of the namespace. This is prepended to the branch name.
Attribute target The branch target for this namespace.
Method createBranch Create and return an IBranch in this namespace.
Method createBranchWithPrefix Create and return an IBranch with a name starting with 'prefix'.
Method findUnusedName Find an unused branch name starting with 'prefix'.
Method getBranches Return the branches in this namespace.
Method getBranchName Get the potential unique name for a branch called 'name'.
Method getByName Find the branch in this namespace called 'name'.
Method isNameUsed Is 'name' already used in this namespace?
Method moveBranch Move the branch into this namespace.
name =
The name of the namespace. This is prepended to the branch name.
target =
The branch target for this namespace.
def createBranch(branch_type, name, registrant, url=None, title=None, lifecycle_status=BranchLifecycleStatus.DEVELOPMENT, summary=None, whiteboard=None):
Create and return an IBranch in this namespace.
def createBranchWithPrefix(branch_type, prefix, registrant, url=None):
Create and return an IBranch with a name starting with 'prefix'.

Use this method to automatically create a branch with an inferred name.

def findUnusedName(prefix):
Find an unused branch name starting with 'prefix'.

Note that there is no guarantee that the name returned by this method will remain unused for very long. If you wish to create a branch with a given prefix, use createBranchWithPrefix.

def getBranches(eager_load=False):
Return the branches in this namespace.
Parameterseager_loadIf True eager load related data for the branches.
def getBranchName(name):
Get the potential unique name for a branch called 'name'.

Note that this name is not guaranteed to be unique. Rather, if there was such a branch with that name, this would be the value of its IBranch.unique_name property.

def getByName(name, default=None):
Find the branch in this namespace called 'name'.
ReturnsIBranch if found, 'default' if not.
def isNameUsed(name):
Is 'name' already used in this namespace?
def moveBranch(branch, mover, new_name=None, rename_if_necessary=False):
Move the branch into this namespace.
ParametersbranchThe IBranch to move.
moverThe IPerson doing the moving.
new_nameA new name for the branch.
rename_if_necessaryRename the branch if the branch name exists already in this namespace.
RaisesBranchCreatorNotMemberOfOwnerTeamif the namespace owner is a team, and 'mover' is not in that team.
BranchCreatorNotOwnerif the namespace owner is an individual and 'mover' is not the owner.
BranchCreationForbiddenif 'mover' is not allowed to create a branch in this namespace due to privacy rules.
BranchExistsif a branch with the 'name' exists already in the namespace, and 'rename_if_necessary' is False.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.