pub enum RevsetExpression {
Show 24 variants
None,
All,
Commits(Vec<CommitId>),
Symbol(String),
Children(Rc<RevsetExpression>),
Ancestors {
heads: Rc<RevsetExpression>,
generation: Range<u32>,
},
Range {
roots: Rc<RevsetExpression>,
heads: Rc<RevsetExpression>,
generation: Range<u32>,
},
DagRange {
roots: Rc<RevsetExpression>,
heads: Rc<RevsetExpression>,
},
Heads(Rc<RevsetExpression>),
Roots(Rc<RevsetExpression>),
VisibleHeads,
PublicHeads,
Branches(String),
RemoteBranches {
branch_needle: String,
remote_needle: String,
},
Tags,
GitRefs,
GitHead,
Filter(RevsetFilterPredicate),
AsFilter(Rc<RevsetExpression>),
Present(Rc<RevsetExpression>),
NotIn(Rc<RevsetExpression>),
Union(Rc<RevsetExpression>, Rc<RevsetExpression>),
Intersection(Rc<RevsetExpression>, Rc<RevsetExpression>),
Difference(Rc<RevsetExpression>, Rc<RevsetExpression>),
}Variants§
None
All
Commits(Vec<CommitId>)
Symbol(String)
Children(Rc<RevsetExpression>)
Ancestors
Range
DagRange
Heads(Rc<RevsetExpression>)
Roots(Rc<RevsetExpression>)
VisibleHeads
PublicHeads
Branches(String)
RemoteBranches
Tags
GitRefs
GitHead
Filter(RevsetFilterPredicate)
AsFilter(Rc<RevsetExpression>)
Marker for subtree that should be intersected as filter.
Present(Rc<RevsetExpression>)
NotIn(Rc<RevsetExpression>)
Union(Rc<RevsetExpression>, Rc<RevsetExpression>)
Intersection(Rc<RevsetExpression>, Rc<RevsetExpression>)
Difference(Rc<RevsetExpression>, Rc<RevsetExpression>)
Implementations§
Source§impl RevsetExpression
impl RevsetExpression
pub fn none() -> Rc<RevsetExpression>
pub fn all() -> Rc<RevsetExpression>
pub fn symbol(value: String) -> Rc<RevsetExpression>
pub fn commit(commit_id: CommitId) -> Rc<RevsetExpression>
pub fn commits(commit_ids: Vec<CommitId>) -> Rc<RevsetExpression>
pub fn visible_heads() -> Rc<RevsetExpression>
pub fn public_heads() -> Rc<RevsetExpression>
pub fn branches(needle: String) -> Rc<RevsetExpression>
pub fn remote_branches( branch_needle: String, remote_needle: String, ) -> Rc<RevsetExpression>
pub fn git_refs() -> Rc<RevsetExpression>
pub fn git_head() -> Rc<RevsetExpression>
pub fn filter(predicate: RevsetFilterPredicate) -> Rc<RevsetExpression>
Sourcepub fn heads(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
pub fn heads(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
Commits in self that don’t have descendants in self.
Sourcepub fn roots(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
pub fn roots(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
Commits in self that don’t have ancestors in self.
Sourcepub fn parents(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
pub fn parents(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
Parents of self.
Sourcepub fn ancestors(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
pub fn ancestors(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
Ancestors of self, including self.
Sourcepub fn children(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
pub fn children(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
Children of self.
Sourcepub fn descendants(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
pub fn descendants(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
Descendants of self, including self.
Sourcepub fn dag_range_to(
self: &Rc<RevsetExpression>,
heads: &Rc<RevsetExpression>,
) -> Rc<RevsetExpression>
pub fn dag_range_to( self: &Rc<RevsetExpression>, heads: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>
Commits that are descendants of self and ancestors of heads, both
inclusive.
Sourcepub fn connected(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
pub fn connected(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
Connects any ancestors and descendants in the set by adding the commits between them.
Sourcepub fn range(
self: &Rc<RevsetExpression>,
heads: &Rc<RevsetExpression>,
) -> Rc<RevsetExpression>
pub fn range( self: &Rc<RevsetExpression>, heads: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>
Commits reachable from heads but not from self.
Sourcepub fn negated(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
pub fn negated(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression>
Commits that are not in self, i.e. the complement of self.
Sourcepub fn union(
self: &Rc<RevsetExpression>,
other: &Rc<RevsetExpression>,
) -> Rc<RevsetExpression>
pub fn union( self: &Rc<RevsetExpression>, other: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>
Commits that are in self or in other (or both).
Sourcepub fn intersection(
self: &Rc<RevsetExpression>,
other: &Rc<RevsetExpression>,
) -> Rc<RevsetExpression>
pub fn intersection( self: &Rc<RevsetExpression>, other: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>
Commits that are in self and in other.
Sourcepub fn minus(
self: &Rc<RevsetExpression>,
other: &Rc<RevsetExpression>,
) -> Rc<RevsetExpression>
pub fn minus( self: &Rc<RevsetExpression>, other: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>
Commits that are in self but not in other.
pub fn evaluate<'repo>( &self, repo: &'repo dyn Repo, workspace_ctx: Option<&RevsetWorkspaceContext<'_>>, ) -> Result<Box<dyn Revset<'repo> + 'repo>, RevsetError>
Trait Implementations§
Source§impl Clone for RevsetExpression
impl Clone for RevsetExpression
Source§fn clone(&self) -> RevsetExpression
fn clone(&self) -> RevsetExpression
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RevsetExpression
impl Debug for RevsetExpression
Source§impl PartialEq for RevsetExpression
impl PartialEq for RevsetExpression
impl Eq for RevsetExpression
impl StructuralPartialEq for RevsetExpression
Auto Trait Implementations§
impl Freeze for RevsetExpression
impl RefUnwindSafe for RevsetExpression
impl !Send for RevsetExpression
impl !Sync for RevsetExpression
impl Unpin for RevsetExpression
impl UnwindSafe for RevsetExpression
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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