Part of lp.code.interfaces.branchmergeproposal View In Hierarchy
Known subclasses: lp.code.interfaces.webservice.IBranchMergeProposal
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. |
If there is not an existing preview diff, one will be created.
Parameters | diff_content | The raw bytes of the diff content to be put in the librarian. |
diff_stat | Text describing the files added, remove or modified. | |
source_revision_id | The revision id that was used from the source branch. | |
target_revision_id | The revision id that was used from the target branch. | |
prerequisite_revision_id | The revision id that was used from the prerequisite branch. | |
conflicts | Text describing the conflicts if any. |
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.
Parameters | return_jobs | If True, return the created jobs. |
Parameters | status | The new status of the merge proposal. |
user | The user making the change. | |
revision_id | The revision id to provide to the underlying status change method. |
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.
As long as the branch is not yet merged, a review can be requested. Requesting a review sets the date_review_requested.
The time that the branch was approved is recoreded in date_reviewed
.
Parameters | reviewer | A person authorised to review branches for merging. |
revision_id | The revision id of the branch that was
reviewed by the reviewer . | |
Raises | UserNotBranchReviewer if the reviewer is not in the team of the branch reviewer for the target branch. |
The time that the branch was rejected is recoreded in date_reviewed
.
Parameters | reviewer | A person authorised to review branches for merging. |
revision_id | The revision id of the branch that was
reviewed by the reviewer . | |
Raises | UserNotBranchReviewer if the reviewer is not in the team of the branch reviewer for the target branch. |
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.
Parameters | merged_revno | The revision number in the target branch that contains the merge of the source branch. (type: int) |
date_merged | The date/time that the merge took place. | |
merged_revno | (type: datetime or a stringified date time value.) | |
merge_reporter | The user that is marking the branch as merged. (type: Person) |
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.
Parameters | registrant | The person registering the new proposal. |
merge_source | The merge_source for the new proposal (defaults to the current merge_source). | |
merge_target | The merge_target for the new proposal (defaults to the current merge_target). | |
merge_prerequisite | The merge_prerequisite for the new proposal (defaults to the current merge_prerequisite). | |
commit_message | The commit message for the new proposal (defaults to the current commit message). | |
description | The description for the new proposal (defaults to the current description). |
If they are not already a reviewer, a vote is created. Otherwise, the details are updated.