l.c.m.b.BranchMergeProposal(SQLBase, BugLinkTargetMixin) : class documentation

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

A relationship between a person and a branch.
Method source_git_ref 0 Undocumented
Method source_git_ref Undocumented
Method target_git_ref 0 Undocumented
Method target_git_ref Undocumented
Method prerequisite_git_ref 0 Undocumented
Method prerequisite_git_ref Undocumented
Method merge_source Undocumented
Method merge_target Undocumented
Method merge_prerequisite Undocumented
Method parent Undocumented
Method private Undocumented
Method next_preview_diff_job Undocumented
Method merged_revision Return the merged revision identifier.
Method bugs Undocumented
Method getRelatedBugTasks Bug tasks which are linked to the source but not the target.
Method createBugLink See BugLinkTargetMixin.
Method deleteBugLink See BugLinkTargetMixin.
Method linkBug See BugLinkTargetMixin.
Method unlinkBug See BugLinkTargetMixin.
Method updateRelatedBugsFromSource See IBranchMergeProposal.
Method address Undocumented
Method supersedes Undocumented
Method target See IHasBranchTarget.
Method title See IBranchMergeProposal.
Method all_comments See IBranchMergeProposal.
Method getComment See IBranchMergeProposal.
Method userCanSetCommentVisibility See IBranchMergeProposal.
Method setCommentVisibility See IBranchMergeProposal.
Method getVoteReference See IBranchMergeProposal.
Method preview_diffs Undocumented
Method preview_diff Undocumented
Method votes Undocumented
Method getNotificationRecipients See IBranchMergeProposal.getNotificationRecipients
Method isValidTransition See IBranchMergeProposal.
Method setStatus See IBranchMergeProposal.
Method setAsWorkInProgress See IBranchMergeProposal.
Method requestReview See IBranchMergeProposal.
Method isMergable See IBranchMergeProposal.
Method approveBranch See IBranchMergeProposal.
Method rejectBranch See IBranchMergeProposal.
Method markAsMerged See IBranchMergeProposal.
Method resubmit See IBranchMergeProposal.
Method nominateReviewer See IBranchMergeProposal.
Method deleteProposal See IBranchMergeProposal.
Method getUnlandedSourceBranchRevisions See IBranchMergeProposal.
Method createComment See IBranchMergeProposal.
Method getUsersVoteReference Get the existing vote reference for the given user.
Method createCommentFromMessage See IBranchMergeProposal.
Method getInlineComments See IBranchMergeProposal.
Method getDraftInlineComments See IBranchMergeProposal.
Method getPreviewDiff See IBranchMergeProposal.
Method saveDraftInlineComment See IBranchMergeProposal.
Method updatePreviewDiff See IBranchMergeProposal.
Method getIncrementalDiffRanges Undocumented
Method generateIncrementalDiff See IBranchMergeProposal.
Method getIncrementalDiffs See IBranchMergeProposal.
Method scheduleDiffUpdates See IBranchMergeProposal.
Method getLatestDiffUpdateJob See IBranchMergeProposal.
Method revision_end_date The cutoff date for showing revisions.
Method getRevisionsSinceReviewStart Get the grouped revisions since the review started.
Method getMissingIncrementalDiffs Undocumented
Static Method preloadDataForBMPs Undocumented
Method _reportTooManyRelatedBugs Undocumented
Method _fetchRelatedBugIDsFromSource Fetch related bug IDs from the source branch.
Method _preview_diffs Undocumented
Method _transitionToState Update the queue_status of the proposal.
Method _mark_unreviewed Clear metadata about a previous review.
Method _reviewProposal Set the proposal to next_state.
Method _normalizeReviewType Normalse the review type.
Method _subscribeUserToStackedBranch Subscribe the user to the branch and those it is stacked on.
Method _acceptable_to_give_visibility Undocumented
Method _ensureAssociatedBranchesVisibleToReviewer A reviewer must be able to see the source and target branches.
Method _getTeamVoteReference Get a vote reference where the user is in the review team.
Method _getVoteReference Get the vote reference for the user.
Method _getNewerRevisions Undocumented

Inherited from SQLBase:

Method __init__ Extended version of the SQLObjectBase constructor.
Method __repr__ Undocumented
Method destroySelf Undocumented
Method __eq__ Equality operator.
Method __ne__ Inverse of __eq__.
Method __storm_invalidated__ Flush cached properties.
Class Method _get_store Undocumented
def source_git_ref 0(self):
def source_git_ref(self, value):
def target_git_ref 0(self):
def target_git_ref(self, value):
def prerequisite_git_ref 0(self):
def prerequisite_git_ref(self, value):
def merge_source(self):
def merge_target(self):
def merge_prerequisite(self):
def parent(self):
def private(self):
def next_preview_diff_job(self):
def merged_revision(self):
Return the merged revision identifier.
def bugs(self):
def getRelatedBugTasks(self, user):
Bug tasks which are linked to the source but not the target.

Implies that these would be fixed, in the target, by the merge.

def createBugLink(self, bug, props=None):
See BugLinkTargetMixin.
def deleteBugLink(self, bug):
See BugLinkTargetMixin.
def linkBug(self, bug, user=None, check_permissions=True, props=None):
See BugLinkTargetMixin.
def unlinkBug(self, bug, user=None, check_permissions=True):
See BugLinkTargetMixin.
def _reportTooManyRelatedBugs(self):
def _fetchRelatedBugIDsFromSource(self):
Fetch related bug IDs from the source branch.
def updateRelatedBugsFromSource(self):
See IBranchMergeProposal.
def address(self):
def supersedes(self):
def target(self):
See IHasBranchTarget.
def title(self):
See IBranchMergeProposal.
def all_comments(self):
See IBranchMergeProposal.
def getComment(self, id):
See IBranchMergeProposal.
def userCanSetCommentVisibility(self, user):
See IBranchMergeProposal.
def setCommentVisibility(self, user, comment_number, visible):
See IBranchMergeProposal.
def getVoteReference(self, id):
See IBranchMergeProposal.

This function can raise WrongBranchMergeProposal.

def _preview_diffs(self):
def preview_diffs(self):
def preview_diff(self):
def votes(self):
def getNotificationRecipients(self, min_level):
See IBranchMergeProposal.getNotificationRecipients
def isValidTransition(self, next_state, user=None):
See IBranchMergeProposal.
def _transitionToState(self, next_state, user=None):
Update the queue_status of the proposal.

Raise an error if the proposal is in a final state.

def setStatus(self, status, user=None, revision_id=None):
See IBranchMergeProposal.
def setAsWorkInProgress(self):
See IBranchMergeProposal.
def _mark_unreviewed(self):
Clear metadata about a previous review.
def requestReview(self, _date_requested=None):
See IBranchMergeProposal.
Parameters_date_requestedused only for testing purposes to override the normal UTC_NOW for when the review was requested.
def isMergable(self):
See IBranchMergeProposal.
def _reviewProposal(self, reviewer, next_state, revision_id, _date_reviewed=None):
Set the proposal to next_state.
def approveBranch(self, reviewer, revision_id, _date_reviewed=None):
See IBranchMergeProposal.
def rejectBranch(self, reviewer, revision_id, _date_reviewed=None):
See IBranchMergeProposal.
def markAsMerged(self, merged_revno=None, merged_revision_id=None, date_merged=None, merge_reporter=None):
See IBranchMergeProposal.
def resubmit(self, registrant, merge_source=None, merge_target=None, merge_prerequisite=DEFAULT, commit_message=None, description=None, break_link=False):
See IBranchMergeProposal.
def _normalizeReviewType(self, review_type):
Normalse the review type.

If review_type is None, it stays None. Otherwise the review_type is converted to lower case, and if the string is empty is gets changed to None.

def _subscribeUserToStackedBranch(self, branch, user, checked_branches=None):
Subscribe the user to the branch and those it is stacked on.
def _acceptable_to_give_visibility(self, branch, reviewer):
def _ensureAssociatedBranchesVisibleToReviewer(self, reviewer):
A reviewer must be able to see the source and target branches.

Currently, we ensure the required visibility by subscribing the user to the branch and those on which it is stacked. We do not subscribe the reviewer if the branch is private and the reviewer is an open team.

def nominateReviewer(self, reviewer, registrant, review_type=None, _date_created=DEFAULT, _notify_listeners=True):
See IBranchMergeProposal.
def deleteProposal(self):
See IBranchMergeProposal.
def getUnlandedSourceBranchRevisions(self):
See IBranchMergeProposal.
def createComment(self, owner, subject, content=None, vote=None, review_type=None, parent=None, _date_created=DEFAULT, previewdiff_id=None, inline_comments=None, _notify_listeners=True):
See IBranchMergeProposal.
def getUsersVoteReference(self, user, review_type=None):
Get the existing vote reference for the given user.
def _getTeamVoteReference(self, user, review_type):
Get a vote reference where the user is in the review team.

Only return those reviews where the review_type matches.

def _getVoteReference(self, user, review_type):

Get the vote reference for the user.

The returned vote reference will either:
  • the existing vote reference for the user
  • a vote reference of the same type that has been requested of a team that the user is a member of
  • a new vote reference for the user
def createCommentFromMessage(self, message, vote, review_type, original_email, _notify_listeners=True, _validate=True):
See IBranchMergeProposal.
def getInlineComments(self, previewdiff_id):
See IBranchMergeProposal.
def getDraftInlineComments(self, previewdiff_id, person):
See IBranchMergeProposal.
def getPreviewDiff(self, id):
See IBranchMergeProposal.
def saveDraftInlineComment(self, previewdiff_id, person, comments):
See IBranchMergeProposal.
def updatePreviewDiff(self, diff_content, source_revision_id, target_revision_id, prerequisite_revision_id=None, conflicts=None):
See IBranchMergeProposal.
def getIncrementalDiffRanges(self):
def generateIncrementalDiff(self, old_revision, new_revision, diff=None):
See IBranchMergeProposal.
def getIncrementalDiffs(self, revision_list):
See IBranchMergeProposal.
def scheduleDiffUpdates(self, return_jobs=True):
See IBranchMergeProposal.
def getLatestDiffUpdateJob(self):
See IBranchMergeProposal.
def revision_end_date(self):
The cutoff date for showing revisions.

If the proposal has been merged, then we stop at the merged date. If it is rejected, we stop at the reviewed date. For superseded proposals, it should ideally use the non-existant date_last_modified, but could use the last comment date.

def _getNewerRevisions(self):
def getRevisionsSinceReviewStart(self):
Get the grouped revisions since the review started.
def getMissingIncrementalDiffs(self):
def preloadDataForBMPs(branch_merge_proposals, user, include_votes=True):
API Documentation for Launchpad, generated by pydoctor at 2021-03-05 00:00:02.