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

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

Known subclasses: lp.code.interfaces.webservice.IBranchMergeProposal

No interface docstring
Method deleteProposal Delete the proposal to merge.
Method updatePreviewDiff Update the preview diff for this proposal.
Method scheduleDiffUpdates Schedule updates of the diffs for this proposal.
Method setStatus Set the state of the merge proposal to the specified status.
Method setAsWorkInProgress Set the state of the merge proposal to 'Work in progress'.
Method requestReview Set the state of merge proposal to 'Needs review'.
Method approveBranch Mark the proposal as 'Code approved'.
Method rejectBranch Mark the proposal as 'Rejected'.
Method markAsMerged Mark the branch merge proposal as merged.
Method resubmit Mark the branch merge proposal as superseded and return a new one.
Method nominateReviewer Set the specified person as a reviewer.
def deleteProposal():
Delete the proposal to merge.
def updatePreviewDiff(diff_content, source_revision_id, target_revision_id, prerequisite_revision_id=None, conflicts=None):
Update the preview diff for this proposal.

If there is not an existing preview diff, one will be created.

Parametersdiff_contentThe raw bytes of the diff content to be put in the librarian.
diff_statText describing the files added, remove or modified.
source_revision_idThe revision id that was used from the source branch.
target_revision_idThe revision id that was used from the target branch.
prerequisite_revision_idThe revision id that was used from the prerequisite branch.
conflictsText describing the conflicts if any.
@call_with(False)
@export_write_operation()
@operation_for_version('devel')
def scheduleDiffUpdates(return_jobs=True):
Schedule updates of the diffs for this proposal.

This can be used if the previous attempt to generate diffs crashed, or if Launchpad failed to notice that the current diffs are outdated for some reason.

Parametersreturn_jobsIf True, return the created jobs.
@call_with(REQUEST_USER)
@rename_parameters_as('revid')
@operation_parameters(Choice(_('The new status of the merge proposal.'), BranchMergeProposalStatus), TextLine(_('An optional parameter for specifying the revision of the branch for the status change.'), False))
@export_write_operation()
def setStatus(status, user, revision_id):
Set the state of the merge proposal to the specified status.
ParametersstatusThe new status of the merge proposal.
userThe user making the change.
revision_idThe revision id to provide to the underlying status change method.
def setAsWorkInProgress():
Set the state of the merge proposal to 'Work in progress'.

This is often useful if the proposal was rejected and is being worked on again, or if the code failed to merge and requires rework.

def requestReview():
Set the state of merge proposal to 'Needs review'.

As long as the branch is not yet merged, a review can be requested. Requesting a review sets the date_review_requested.

def approveBranch(reviewer, revision_id):
Mark the proposal as 'Code approved'.

The time that the branch was approved is recoreded in date_reviewed.

ParametersreviewerA person authorised to review branches for merging.
revision_idThe revision id of the branch that was reviewed by the reviewer.
RaisesUserNotBranchReviewer if the reviewer is not in the team of the branch reviewer for the target branch.
def rejectBranch(reviewer, revision_id):
Mark the proposal as 'Rejected'.

The time that the branch was rejected is recoreded in date_reviewed.

ParametersreviewerA person authorised to review branches for merging.
revision_idThe revision id of the branch that was reviewed by the reviewer.
RaisesUserNotBranchReviewer if the reviewer is not in the team of the branch reviewer for the target branch.
def markAsMerged(merged_revno=None, date_merged=None, merge_reporter=None):
Mark the branch merge proposal as merged.

If the merged_revno is supplied, then the BranchRevision is checked to see that revision is available in the target branch. If it is then the date from that revision is used as the date_merged. If it is not available, then the date_merged is set as if the merged_revno was not supplied.

If no merged_revno is supplied, the date_merged is set to the value of date_merged, or if the parameter date_merged is None, then UTC_NOW is used.

Parametersmerged_revnoThe revision number in the target branch that contains the merge of the source branch. (type: int)
date_mergedThe date/time that the merge took place.
merged_revno (type: datetime or a stringified date time value.)
merge_reporterThe user that is marking the branch as merged. (type: Person)
def resubmit(registrant, merge_source=None, merge_target=None, merge_prerequisite=DEFAULT, commit_message=None, description=None):
Mark the branch merge proposal as superseded and return a new one.

The new proposal is created as work-in-progress, and copies across user-entered data like the whiteboard. All the current proposal's reviewers, including those who have only been nominated, are requested to review the new proposal.

ParametersregistrantThe person registering the new proposal.
merge_sourceThe merge_source for the new proposal (defaults to the current merge_source).
merge_targetThe merge_target for the new proposal (defaults to the current merge_target).
merge_prerequisiteThe merge_prerequisite for the new proposal (defaults to the current merge_prerequisite).
commit_messageThe commit message for the new proposal (defaults to the current commit message).
descriptionThe description for the new proposal (defaults to the current description).
@operation_parameters(Reference(_('A reviewer.'), IPerson), Text())
@call_with(REQUEST_USER)
@operation_returns_entry(Interface)
@export_write_operation()
def nominateReviewer(reviewer, registrant, review_type=None):
Set the specified person as a reviewer.

If they are not already a reviewer, a vote is created. Otherwise, the details are updated.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.