l.c.m.b.Branch(SQLBase, WebhookTargetMixin, BzrIdentityMixin) : class documentation

Part of lp.code.model.branch View In Hierarchy

A sequence of ordered revisions in Bazaar.
Method valid_webhook_event_types Undocumented
Method default_webhook_event_types Undocumented
Method private Undocumented
Method setPrivate See IBranch.
Method getAllowedInformationTypes See IBranch.
Method transitionToInformationType See IBranch.
Method setOwner See IBranch.
Method __repr__ Undocumented
Method target See IBranch.
Method setTarget See IBranch.
Method namespace See IBranch.
Method distribution See IBranch.
Method sourcepackage See IBranch.
Method revision_history Undocumented
Method getLinkedBugTasks See IBranch.
Method linkBug See IBranch.
Method unlinkBug See IBranch.
Method getSpecificationLinks See IBranch.
Method linkSpecification See IBranch.
Method unlinkSpecification See IBranch.
Method landing_targets See IBranch.
Method getPrecachedLandingTargets See IBranch.
Method active_landing_targets Merge proposals not in final states where this branch is source.
Method landing_candidates See IBranch.
Method getPrecachedLandingCandidates See IBranch.
Method dependent_branches See IBranch.
Method getMergeProposals See IBranch.
Method getDependentMergeProposals See IBranch.
Method getMergeProposalByID See IBranch.
Method isBranchMergeable See IBranch.
Method addLandingTarget See IBranch.
Method scheduleDiffUpdates See IBranch.
Method markRecipesStale See IBranch.
Method markSnapsStale See IBranch.
Method addToLaunchBag See IBranch.
Method getStackedBranches See IBranch.
Method getStackedOnBranches See IBranch.
Method code_is_browseable See IBranch.
Method getCodebrowseUrl See IBranch.
Method getCodebrowseUrlForRevision See IBranch.
Method browse_source_url Undocumented
Method composePublicURL See IBranch.
Method getInternalBzrUrl See IBranch.
Method getBzrBranch See IBranch.
Method display_name See IBranch.
Method code_reviewer See IBranch.
Method isPersonTrustedReviewer See IBranch.
Method latest_revisions See IBranch.
Method getMainlineBranchRevisions See IBranch.
Method getBlob See IBranch.
Method getDiff See IBranch.
Method canBeDeleted See IBranch.
Method code_import Undocumented
Method deletionRequirements See IBranch.
Method associatedProductSeries See IBranch.
Method getProductSeriesPushingTranslations See IBranch.
Method associatedSuiteSourcePackages See IBranch.
Method userCanBeSubscribed Undocumented
Method subscribe See IBranch.
Method getSubscription See IBranch.
Method getSubscriptionsByLevel See IBranch.
Method hasSubscription See IBranch.
Method unsubscribe See IBranch.
Method getBranchRevision See IBranch.
Method removeBranchRevisions See IBranch.
Method createBranchRevision See IBranch.
Method createBranchRevisionFromIDs See IBranch.
Method getTipRevision See IBranch.
Method updateScannedDetails See IBranch.
Method getNotificationRecipients See IBranch.
Method pending_writes See IBranch.
Method pending_updates See IBranch.
Method getScannerData See IBranch.
Method getPullURL See IBranch.
Method unscan Undocumented
Method rescan See IBranchModerate.
Method getLatestScanJob Undocumented
Method requestMirror See IBranch.
Method startMirroring See IBranch.
Method branchChanged See IBranch.
Method mirrorFailed See IBranch.
Method destroySelf See IBranch.
Method checkUpgrade Undocumented
Method needs_upgrading See IBranch.
Method upgrade_pending See IBranch.
Method requestUpgrade See IBranch.
Method visibleByUser See IBranch.
Method recipes See IHasRecipes.
Method _reconcileAccess Reconcile the branch's sharing information.
Method _api_landing_targets Undocumented
Method _api_landing_candidates Undocumented
Method _createMergeProposal See IBranch.
Method _deletionRequirements Determine what operations must be performed to delete this branch.
Method _breakReferences Break all external references to this branch.
Method _associatedProductSeries Helper for eager loading associatedProductSeries.
Method _associatedSuiteSourcePackages Helper for associatedSuiteSourcePackages.
Method _pending_mirror_operations Does this branch have pending mirror operations?
Method _findStackedBranch Undocumented
Method _deleteBranchSubscriptions Delete subscriptions for this branch prior to deleting branch.
Method _deleteJobs Delete jobs for this branch prior to deleting branch.
Method _known_viewers A set of known persons able to view this branch.
Method _recipes Undecorated version of recipes for use by markRecipesStale.

Inherited from SQLBase:

Method __init__ Extended version of the SQLObjectBase constructor.
Method __eq__ Equality operator.
Method __ne__ Inverse of __eq__.
Method __storm_invalidated__ Flush cached properties.
Class Method _get_store Undocumented

Inherited from WebhookTargetMixin:

Method webhooks Undocumented
Method newWebhook Undocumented

Inherited from BzrIdentityMixin:

Method shortened_path See IBranch.
Method bzr_identity See IBranch.
Method getBranchIdentities See IBranch.
Method getBranchLinks See IBranch.
@property
def valid_webhook_event_types(self):
Undocumented
@property
def default_webhook_event_types(self):
Undocumented
@property
def private(self):
Undocumented
def _reconcileAccess(self):
Reconcile the branch's sharing information.

Takes the information_type and target and makes the related AccessArtifact and AccessPolicyArtifacts match.

def setPrivate(self, private, user):
See IBranch.
def getAllowedInformationTypes(self, who):
See IBranch.
def transitionToInformationType(self, information_type, who, verify_policy=True):
See IBranch.
def setOwner(self, new_owner, user):
See IBranch.
def __repr__(self):
Undocumented
@property
def target(self):
See IBranch.
def setTarget(self, user, project=None, source_package=None):
See IBranch.
@property
def namespace(self):
See IBranch.
@property
def distribution(self):
See IBranch.
@property
def sourcepackage(self):
See IBranch.
@property
def revision_history(self):
Undocumented
def getLinkedBugTasks(self, user, status_filter=None):
See IBranch.
def linkBug(self, bug, registrant):
See IBranch.
def unlinkBug(self, bug, user):
See IBranch.
def getSpecificationLinks(self, user):
See IBranch.
def linkSpecification(self, spec, registrant):
See IBranch.
def unlinkSpecification(self, spec, user):
See IBranch.
@property
def landing_targets(self):
See IBranch.
def getPrecachedLandingTargets(self, user):
See IBranch.
@property
def _api_landing_targets(self):
Undocumented
@property
def active_landing_targets(self):
Merge proposals not in final states where this branch is source.
@property
def landing_candidates(self):
See IBranch.
def getPrecachedLandingCandidates(self, user):
See IBranch.
@property
def _api_landing_candidates(self):
Undocumented
@property
def dependent_branches(self):
See IBranch.
def getMergeProposals(self, status=None, visible_by_user=None, merged_revnos=None, eager_load=False):
See IBranch.
def getDependentMergeProposals(self, status=None, visible_by_user=None, eager_load=False):
See IBranch.
def getMergeProposalByID(self, id):
See IBranch.
def isBranchMergeable(self, target_branch):
See IBranch.
def addLandingTarget(self, registrant, merge_target, merge_prerequisite=None, whiteboard=None, date_created=None, needs_review=False, description=None, review_requests=None, commit_message=None):
See IBranch.
def _createMergeProposal(self, registrant, merge_target, merge_prerequisite=None, needs_review=True, initial_comment=None, commit_message=None, reviewers=None, review_types=None):
See IBranch.
def scheduleDiffUpdates(self):
See IBranch.
def markRecipesStale(self):
See IBranch.
def markSnapsStale(self):
See IBranch.
def addToLaunchBag(self, launchbag):
See IBranch.
def getStackedBranches(self):
See IBranch.
def getStackedOnBranches(self):
See IBranch.
@property
def code_is_browseable(self):
See IBranch.
def getCodebrowseUrl(self, *extras):
See IBranch.
def getCodebrowseUrlForRevision(self, revision):
See IBranch.
@property
def browse_source_url(self):
Undocumented
def composePublicURL(self, scheme='http'):
See IBranch.
def getInternalBzrUrl(self):
See IBranch.
def getBzrBranch(self):
See IBranch.
@property
def display_name(self):
See IBranch.
@property
def code_reviewer(self):
See IBranch.
def isPersonTrustedReviewer(self, reviewer):
See IBranch.
def latest_revisions(self, quantity=10):
See IBranch.
def getMainlineBranchRevisions(self, start_date, end_date=None, oldest_first=False):
See IBranch.
def getBlob(self, filename, revision_id=None, enable_memcache=None, logger=None):
See IBranch.
def getDiff(self, new, old=None):
See IBranch.
def canBeDeleted(self):
See IBranch.
@cachedproperty
def code_import(self):
Undocumented
def _deletionRequirements(self, eager_load=False):
Determine what operations must be performed to delete this branch.

Two dictionaries are returned, one for items that must be deleted, one for items that must be altered. The item in question is the key, and the value is a user-facing string explaining why the item is affected.

As well as the dictionaries, this method returns two list of callables that may be called to perform the alterations and deletions needed.

def deletionRequirements(self, eager_load=False):
See IBranch.
def _breakReferences(self):
Break all external references to this branch.

NULLable references will be NULLed. References which are not NULLable will cause the item holding the reference to be deleted.

This function is guaranteed to perform the operations predicted by deletionRequirements, because it uses the same backing function.

@cachedproperty
def _associatedProductSeries(self):
Helper for eager loading associatedProductSeries.
def associatedProductSeries(self):
See IBranch.
def getProductSeriesPushingTranslations(self):
See IBranch.
@cachedproperty
def _associatedSuiteSourcePackages(self):
Helper for associatedSuiteSourcePackages.
def associatedSuiteSourcePackages(self):
See IBranch.
def userCanBeSubscribed(self, person):
Undocumented
def subscribe(self, person, notification_level, max_diff_lines, code_review_level, subscribed_by, check_stacked_visibility=True):
See IBranch.

Subscribe person to this branch and also to any editable stacked on branches they cannot see.

def getSubscription(self, person):
See IBranch.
def getSubscriptionsByLevel(self, notification_levels):
See IBranch.
def hasSubscription(self, person):
See IBranch.
def unsubscribe(self, person, unsubscribed_by, ignore_permissions=False):
See IBranch.
def getBranchRevision(self, sequence=None, revision=None, revision_id=None):
See IBranch.
def removeBranchRevisions(self, revision_ids):
See IBranch.
def createBranchRevision(self, sequence, revision):
See IBranch.
def createBranchRevisionFromIDs(self, revision_id_sequence_pairs):
See IBranch.
def getTipRevision(self):
See IBranch.
def updateScannedDetails(self, db_revision, revision_count):
See IBranch.
def getNotificationRecipients(self):
See IBranch.
@property
def _pending_mirror_operations(self):
Does this branch have pending mirror operations?

A branch has pending mirror operations if it is an imported branch that has just been pushed to or if it is in the middle of being mirrored.

@property
def pending_writes(self):
See IBranch.

A branch has pending writes if it has pending mirror operations or if it has been mirrored and not yet scanned. Use this when you need to know if the branch is in a condition where it is possible to run other jobs on it: for example, a branch that has been unscanned cannot support jobs being run for its related merge proposals.

@property
def pending_updates(self):
See IBranch.

A branch has pending updates if it has pending mirror operations or if it has a pending scan job. Use this when you need to know if there is work queued, for example when deciding whether to display in-progress UI indicators.

def getScannerData(self):
See IBranch.
def getPullURL(self):
See IBranch.
def unscan(self, rescan=True):
Undocumented
def rescan(self):
See IBranchModerate.
def getLatestScanJob(self):
Undocumented
def requestMirror(self):
See IBranch.
def startMirroring(self):
See IBranch.
def _findStackedBranch(self, stacked_on_location):
Undocumented
def branchChanged(self, stacked_on_url, last_revision_id, control_format, branch_format, repository_format):
See IBranch.
def mirrorFailed(self, reason):
See IBranch.
def _deleteBranchSubscriptions(self):
Delete subscriptions for this branch prior to deleting branch.
def _deleteJobs(self):
Delete jobs for this branch prior to deleting branch.

This deletion includes `BranchJob`s associated with the branch,
as well as `BuildQueue` entries for `TranslationTemplateBuildJob`s
and `TranslationTemplateBuild`s.
def destroySelf(self, break_references=False):
See IBranch.
def checkUpgrade(self):
Undocumented
@property
def needs_upgrading(self):
See IBranch.
@property
def upgrade_pending(self):
See IBranch.
def requestUpgrade(self, requester):
See IBranch.
@cachedproperty
def _known_viewers(self):
A set of known persons able to view this branch.

This method must return an empty set or branch searches will trigger late evaluation. Any 'should be set on load' properties must be done by the branch search.

If you are tempted to change this method, don't. Instead see visibleByUser which defines the just-in-time policy for branch visibility, and IBranchCollection which honours visibility rules.

def visibleByUser(self, user, checked_branches=None):
See IBranch.
@property
def _recipes(self):
Undecorated version of recipes for use by markRecipesStale.
@property
def recipes(self):
See IHasRecipes.
API Documentation for Launchpad, generated by pydoctor at 2020-02-19 00:00:13.