pub struct Branch(/* private fields */);Expand description
A Bazaar branch.
Implementations§
Source§impl Branch
impl Branch
pub fn get<'a>(&self, client: &'a dyn Client) -> Result<BranchFull, Error>
pub fn get_wadl<'a>(&self, client: &'a dyn Client) -> Result<Resource, Error>
pub fn put<'a>( &self, client: &'a dyn Client, representation: &BranchFull, ) -> Result<(), Error>
pub fn patch<'a>( &self, client: &'a dyn Client, representation: &BranchDiff, ) -> Result<(), Error>
pub fn delete<'a>(&self, client: &'a dyn Client) -> Result<(), Error>
Sourcepub fn get_merge_proposals<'a>(
&self,
client: &'a dyn Client,
status: Option<&str>,
merged_revnos: Option<&str>,
) -> Result<PagedCollection<'a, BranchMergeProposalPage>, Error>
pub fn get_merge_proposals<'a>( &self, client: &'a dyn Client, status: Option<&str>, merged_revnos: Option<&str>, ) -> Result<PagedCollection<'a, BranchMergeProposalPage>, Error>
Return matching BranchMergeProposals.
§Arguments
status: A list of merge proposal statuses to filter by.merged_revnos
Sourcepub fn compose_public_url<'a>(
&self,
client: &'a dyn Client,
scheme: &str,
) -> Result<(), Error>
pub fn compose_public_url<'a>( &self, client: &'a dyn Client, scheme: &str, ) -> Result<(), Error>
Sourcepub fn is_person_trusted_reviewer<'a>(
&self,
client: &'a dyn Client,
reviewer: &Person,
) -> Result<(), Error>
pub fn is_person_trusted_reviewer<'a>( &self, client: &'a dyn Client, reviewer: &Person, ) -> Result<(), Error>
Return true if the reviewer is a trusted reviewer.
The reviewer is trusted if they are either own the branch, or are in the team that owns the branch, or they are in the review team for the branch.
§Arguments
reviewer: A person for which the reviewer status is in question.
Sourcepub fn can_be_deleted<'a>(&self, client: &'a dyn Client) -> Result<(), Error>
pub fn can_be_deleted<'a>(&self, client: &'a dyn Client) -> Result<(), Error>
Can this branch be deleted in its current state.
A branch is considered deletable if it has no revisions and is not linked to any bugs, specs, productseries, or code imports.
§Arguments
Sourcepub fn get_subscription<'a>(
&self,
client: &'a dyn Client,
person: &Person,
) -> Result<BranchSubscriptionFull, Error>
pub fn get_subscription<'a>( &self, client: &'a dyn Client, person: &Person, ) -> Result<BranchSubscriptionFull, Error>
Sourcepub fn set_owner<'a>(
&self,
client: &'a dyn Client,
new_owner: &Person,
) -> Result<(), Error>
pub fn set_owner<'a>( &self, client: &'a dyn Client, new_owner: &Person, ) -> Result<(), Error>
Sourcepub fn set_target<'a>(
&self,
client: &'a dyn Client,
project: Option<&Project>,
source_package: Option<&SourcePackage>,
) -> Result<(), Error>
pub fn set_target<'a>( &self, client: &'a dyn Client, project: Option<&Project>, source_package: Option<&SourcePackage>, ) -> Result<(), Error>
Set the target of the branch to be project or source_package.
Only one of project or source_package can be set, and if neither is set, the branch gets moved into the junk namespace of the branch owner.
§Arguments
project: The project the branch belongs to.source_package: The source package the branch belongs to.
Sourcepub fn link_specification<'a>(
&self,
client: &'a dyn Client,
spec: &Specification,
) -> Result<(), Error>
pub fn link_specification<'a>( &self, client: &'a dyn Client, spec: &Specification, ) -> Result<(), Error>
Sourcepub fn unlink_specification<'a>(
&self,
client: &'a dyn Client,
spec: &Specification,
) -> Result<(), Error>
pub fn unlink_specification<'a>( &self, client: &'a dyn Client, spec: &Specification, ) -> Result<(), Error>
Sourcepub fn create_merge_proposal<'a>(
&self,
client: &'a dyn Client,
target_branch: &Branch,
prerequisite_branch: Option<&Branch>,
needs_review: Option<&str>,
initial_comment: Option<&str>,
commit_message: Option<&str>,
reviewers: Option<&str>,
review_types: Option<&str>,
) -> Result<Option<BranchMergeProposal>, Error>
pub fn create_merge_proposal<'a>( &self, client: &'a dyn Client, target_branch: &Branch, prerequisite_branch: Option<&Branch>, needs_review: Option<&str>, initial_comment: Option<&str>, commit_message: Option<&str>, reviewers: Option<&str>, review_types: Option<&str>, ) -> Result<Option<BranchMergeProposal>, Error>
Create a new BranchMergeProposal with this branch as the source.
Both the target_branch and the prerequisite_branch, if it is there, must be branches with the same target as the source branch.
Personal branches (a.k.a. junk branches) cannot specify landing targets.
§Arguments
-
target_branch -
prerequisite_branch -
needs_review: Needs reviewIf True the proposal needs review.Otherwise, it will be work in progress.
-
initial_comment: Initial commentRegistrant’s initial description of proposal.
-
commit_message: Commit messageMessage to use when committing this merge.
-
reviewers -
review_types
Sourcepub fn subscribe<'a>(
&self,
client: &'a dyn Client,
person: &Person,
notification_level: &NotificationLevel,
max_diff_lines: &MaxDiffLines,
code_review_level: &CodeReviewLevel,
) -> Result<BranchSubscriptionFull, Error>
pub fn subscribe<'a>( &self, client: &'a dyn Client, person: &Person, notification_level: &NotificationLevel, max_diff_lines: &MaxDiffLines, code_review_level: &CodeReviewLevel, ) -> Result<BranchSubscriptionFull, Error>
Subscribe this person to the branch.
§Arguments
person: The person to subscribe.notification_level: The level of notification to subscribe to.max_diff_lines: The max number of lines for diff email.code_review_level: The level of code review notification emails.