pub struct Bisector<'repo> { /* private fields */ }
Expand description
Performs bisection to find the first bad commit in a range.
Implementations§
Source§impl<'repo> Bisector<'repo>
impl<'repo> Bisector<'repo>
Sourcepub fn new(
repo: &'repo dyn Repo,
input_range: Arc<ResolvedRevsetExpression>,
) -> Result<Self, BisectionError>
pub fn new( repo: &'repo dyn Repo, input_range: Arc<ResolvedRevsetExpression>, ) -> Result<Self, BisectionError>
Create a new bisector. The range’s heads are assumed to be bad. Parents of the range’s roots are assumed to be good.
Sourcepub fn mark_skipped(&mut self, id: CommitId)
pub fn mark_skipped(&mut self, id: CommitId)
Mark a commit as skipped (cannot be determined if it’s good or bad).
Sourcepub fn mark(&mut self, id: CommitId, evaluation: Evaluation)
pub fn mark(&mut self, id: CommitId, evaluation: Evaluation)
Mark a commit as good, bad, or skipped, according to the outcome in
evaluation
.
Sourcepub fn good_commits(&self) -> &HashSet<CommitId>
pub fn good_commits(&self) -> &HashSet<CommitId>
The commits that were marked good.
Sourcepub fn bad_commits(&self) -> &HashSet<CommitId>
pub fn bad_commits(&self) -> &HashSet<CommitId>
The commits that were marked bad.
Sourcepub fn skipped_commits(&self) -> &HashSet<CommitId>
pub fn skipped_commits(&self) -> &HashSet<CommitId>
The commits that were skipped.
Sourcepub fn next_step(&mut self) -> Result<NextStep, BisectionError>
pub fn next_step(&mut self) -> Result<NextStep, BisectionError>
Find the next commit to evaluate, or determine that there are no more steps.
Auto Trait Implementations§
impl<'repo> Freeze for Bisector<'repo>
impl<'repo> !RefUnwindSafe for Bisector<'repo>
impl<'repo> !Send for Bisector<'repo>
impl<'repo> !Sync for Bisector<'repo>
impl<'repo> Unpin for Bisector<'repo>
impl<'repo> !UnwindSafe for Bisector<'repo>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more