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

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

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

No interface docstring
Whiteboard whiteboard Notes about the merge.
Attribute next_preview_diff_job The next BranchMergeProposalJob that will update a preview diff.
Attribute merged_revision The revision on the target branch which contains the merge from the source branch (VCS-agnostic).
Attribute title A nice human readable name to describe the merge proposal. This is generated from the source and target branch, and used as the tal fmt:link text and for email subjects.
Text root_message_id Undocumented
Datetime revision_end_date Undocumented
Method getComment Return the CodeReviewComment with the specified ID.
Method userCanSetCommentVisibility Can user set code review comment visibility?
Method setCommentVisibility Set the visible attribute on a code review comment.
Method getRelatedBugTasks Return the Bug tasks related to this merge proposal.
Method updateRelatedBugsFromSource Update related bug links based on commits in the source branch.
Method getRevisionsSinceReviewStart Return all the revisions added since the review began.
Method getVoteReference Return the CodeReviewVoteReference with the specified ID.
Method getNotificationRecipients Return the people who should be notified.
Method isValidTransition True if it is valid for user update the proposal to next_state.
Method isMergable Is the proposal in a state that allows it to being merged?
Method getUnlandedSourceBranchRevisions Return a sequence of BranchRevision objects.
Method getUsersVoteReference Get the existing vote reference for the given user.
Method generateIncrementalDiff Generate an incremental diff for the merge proposal.
Method getIncrementalDiffs Return a list of diffs for the specified revisions.
Method getPreviewDiff Return the preview diff with the given id.
Method getInlineComments Return a list of inline comments related to this MP.
Method getLatestDiffUpdateJob Return the latest IUpdatePreviewDiffJob for this MP.
whiteboard =
Notes about the merge.
next_preview_diff_job =
The next BranchMergeProposalJob that will update a preview diff.
merged_revision =
The revision on the target branch which contains the merge from the source branch (VCS-agnostic).
title =
A nice human readable name to describe the merge proposal. This is generated from the source and target branch, and used as the tal fmt:link text and for email subjects.
root_message_id =
Undocumented
revision_end_date =
Undocumented
@operation_parameters(Int(_('A CodeReviewComment ID.')))
@operation_returns_entry(Interface)
@export_read_operation()
def getComment(id):
Return the CodeReviewComment with the specified ID.
RaisesWrongBranchMergeProposalif the comment with this ID is not on this merge proposal.
def userCanSetCommentVisibility(user):
Can user set code review comment visibility?

Admins and registry experts can set the visibility of any code review comment.

Comment authors can also set the visibility of their own comments, but that is not checked here; this method determines whether arbitrary users can set the visibility of comments they did not make themselves.

@operation_parameters(Int(_('The comment ID.'), True), Bool(_('Show this comment?'), True))
@call_with(REQUEST_USER)
@export_write_operation()
@operation_for_version('devel')
def setCommentVisibility(user, comment_number, visible):
Set the visible attribute on a code review comment.

This is restricted to Launchpad admins, registry experts, and comment authors, and will return a HTTP Error 401: Unauthorized error for non-admin callers.

RaisesWrongBranchMergeProposalif the comment with this ID is not on this merge proposal.
@call_with(REQUEST_USER)
@operation_returns_collection_of(Interface)
@export_read_operation()
@operation_for_version('devel')
def getRelatedBugTasks(user):
Return the Bug tasks related to this merge proposal.
def updateRelatedBugsFromSource():
Update related bug links based on commits in the source branch.

This is currently only meaningful for Git-based merge proposals.

def getRevisionsSinceReviewStart():
Return all the revisions added since the review began.

Revisions are grouped by creation (i.e. push) time. :return: An iterator of (date, iterator of revision data)

def getVoteReference(id):
Return the CodeReviewVoteReference with the specified ID.
def getNotificationRecipients(min_level):
Return the people who should be notified.

Recipients will be returned as a dictionary where the key is the person, and the values are (subscription, rationale) tuples.

Parametersmin_levelThe minimum notification level needed to be notified.
def isValidTransition(next_state, user=None):
True if it is valid for user update the proposal to next_state.
def isMergable():
Is the proposal in a state that allows it to being merged?

As long as the proposal isn't in one of the end states, it is valid to be merged.

def getUnlandedSourceBranchRevisions():
Return a sequence of BranchRevision objects.

Returns up to 10 revisions that are in the revision history for the source branch that are not in the revision history of the target branch. These are the revisions that have been committed to the source branch since it branched off the target branch.

For Bazaar, this returns a sequence of BranchRevision objects. For Git, this returns a sequence of commit information dicts.

def getUsersVoteReference(user):
Get the existing vote reference for the given user.
ReturnsA CodeReviewVoteReference or None.
def generateIncrementalDiff(old_revision, new_revision, diff=None):
Generate an incremental diff for the merge proposal.
Parametersold_revisionThe Revision to generate the diff from.
new_revisionThe Revision to generate the diff to.
diffIf supplied, a pregenerated Diff.
def getIncrementalDiffs(revision_list):
Return a list of diffs for the specified revisions.
Parametersrevision_listA list of tuples of (Revision, Revision). The first revision in the tuple is the old revision. The second is the new revision.
ReturnsA list of IncrementalDiffs in the same order as the supplied Revisions.
def getPreviewDiff(id):
Return the preview diff with the given id.
ParametersidThe id of the target PreviewDiff.
@export_read_operation()
@operation_parameters(Int())
@operation_for_version('devel')
def getInlineComments(previewdiff_id):
Return a list of inline comments related to this MP.

The return value is an list of dictionaries (objects), each one representing a comment with 'line_number', 'person', 'text' and 'date' attributes.

Parameterspreviewdiff_idThe ID of the target PreviewDiff.
def getLatestDiffUpdateJob():
Return the latest IUpdatePreviewDiffJob for this MP.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.