pub struct ProposalRound {
pub repo: String,
pub branch: String,
pub base: String,
pub proposals: Vec<Proposal>,
}Expand description
The proposals aimed at one branch of one repository, plus the base they are aimed at.
Fields§
§repo: StringThe repository, as the view names it (<owner>/<name>.git).
branch: StringThe branch proposals are aimed at, short form (main).
base: StringThe branch’s commit when the round was read, and the prev every
landing in it is CAS’d against.
proposals: Vec<Proposal>The round’s proposals, in refname order.
Implementations§
Source§impl ProposalRound
impl ProposalRound
Sourcepub fn from_view(view: &View, repo: &str, branch: &str) -> Option<Self>
pub fn from_view(view: &View, repo: &str, branch: &str) -> Option<Self>
Reads the round for repo and branch out of view.
None when the branch does not exist: there is nothing to
propose to, and a queue that invented a base would be deciding
what a repository’s history starts from.
Ordering is by refname, and deliberately not by when the ref was pushed. The view records no push time, and taking the order from the op log’s sequence numbers would make a round’s behaviour depend on how far the log had been compacted.
Sourcepub fn changes(&self) -> Vec<Change>
pub fn changes(&self) -> Vec<Change>
The round as queue input.
The workspace is the proposal’s own refname, so a landing recorded against a workspace names the thing that was proposed rather than a number only this round knows.
Sourcepub fn target_ref(&self) -> String
pub fn target_ref(&self) -> String
The view key of the branch this round lands on.
Sourcepub fn already_integrated(&self, workdir: &Path) -> Vec<u64>
pub fn already_integrated(&self, workdir: &Path) -> Vec<u64>
The proposals in this round whose head is already an ancestor of the branch: landed by an earlier round, or merged some other way.
Proposal refs survive their landing on purpose (sweeping one
would decide on the author’s behalf that the change is done), and
the queue’s own already-landed memory lives in a MergeQueue
that a node builds fresh per round. Without this, every landed
proposal re-entered every later round as a no-op merge, costing a
CI run and a landing op each time. Ancestry is read from git in
workdir, a worktree of the served repository.
Trait Implementations§
Source§impl Clone for ProposalRound
impl Clone for ProposalRound
Source§fn clone(&self) -> ProposalRound
fn clone(&self) -> ProposalRound
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProposalRound
impl Debug for ProposalRound
Source§impl PartialEq for ProposalRound
impl PartialEq for ProposalRound
Source§fn eq(&self, other: &ProposalRound) -> bool
fn eq(&self, other: &ProposalRound) -> bool
self and other values to be equal, and is used by ==.