Enum jj_lib::revset::RevsetExpression
source · pub enum RevsetExpression {
Show 19 variants
None,
All,
Commits(Vec<CommitId>),
CommitRef(RevsetCommitRef),
Ancestors {
heads: Rc<RevsetExpression>,
generation: Range<u64>,
},
Descendants {
roots: Rc<RevsetExpression>,
generation: Range<u64>,
},
Range {
roots: Rc<RevsetExpression>,
heads: Rc<RevsetExpression>,
generation: Range<u64>,
},
DagRange {
roots: Rc<RevsetExpression>,
heads: Rc<RevsetExpression>,
},
Reachable {
sources: Rc<RevsetExpression>,
domain: Rc<RevsetExpression>,
},
Heads(Rc<RevsetExpression>),
Roots(Rc<RevsetExpression>),
Latest {
candidates: Rc<RevsetExpression>,
count: usize,
},
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>)
CommitRef(RevsetCommitRef)
Ancestors
Descendants
Range
DagRange
Reachable
Heads(Rc<RevsetExpression>)
Roots(Rc<RevsetExpression>)
Latest
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 working_copy(workspace_id: WorkspaceId) -> Rc<RevsetExpression>
pub fn working_copies() -> Rc<RevsetExpression>
pub fn symbol(value: String) -> Rc<RevsetExpression>
pub fn remote_symbol(name: String, remote: 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 root() -> Rc<RevsetExpression>
pub fn branches(pattern: StringPattern) -> Rc<RevsetExpression>
pub fn remote_branches( branch_pattern: StringPattern, remote_pattern: StringPattern, ) -> Rc<RevsetExpression>
pub fn git_refs() -> Rc<RevsetExpression>
pub fn git_head() -> Rc<RevsetExpression>
pub fn latest(self: &Rc<RevsetExpression>, count: usize) -> Rc<RevsetExpression>
pub fn filter(predicate: RevsetFilterPredicate) -> Rc<RevsetExpression>
sourcepub fn is_empty() -> Rc<RevsetExpression>
pub fn is_empty() -> Rc<RevsetExpression>
Find any empty commits.
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 ancestors_at(
self: &Rc<RevsetExpression>,
generation: u64,
) -> Rc<RevsetExpression>
pub fn ancestors_at( self: &Rc<RevsetExpression>, generation: u64, ) -> Rc<RevsetExpression>
Ancestors of self at an offset of generation behind self.
The generation offset is zero-based starting from self.
sourcepub fn ancestors_range(
self: &Rc<RevsetExpression>,
generation_range: Range<u64>,
) -> Rc<RevsetExpression>
pub fn ancestors_range( self: &Rc<RevsetExpression>, generation_range: Range<u64>, ) -> Rc<RevsetExpression>
Ancestors of self in the given range.
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 descendants_at(
self: &Rc<RevsetExpression>,
generation: u64,
) -> Rc<RevsetExpression>
pub fn descendants_at( self: &Rc<RevsetExpression>, generation: u64, ) -> Rc<RevsetExpression>
Descendants of self at an offset of generation ahead of self.
The generation offset is zero-based starting from 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 reachable(
self: &Rc<RevsetExpression>,
domain: &Rc<RevsetExpression>,
) -> Rc<RevsetExpression>
pub fn reachable( self: &Rc<RevsetExpression>, domain: &Rc<RevsetExpression>, ) -> Rc<RevsetExpression>
All commits within domain reachable from this set of commits, by
traversing either parent or child edges.
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 union_all(expressions: &[Rc<RevsetExpression>]) -> Rc<RevsetExpression>
pub fn union_all(expressions: &[Rc<RevsetExpression>]) -> Rc<RevsetExpression>
Commits that are in any of the expressions.
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.
sourcepub fn resolve_programmatic(
self: Rc<Self>,
repo: &dyn Repo,
) -> ResolvedExpression
pub fn resolve_programmatic( self: Rc<Self>, repo: &dyn Repo, ) -> ResolvedExpression
Resolve a programmatically created revset expression. In particular, the
expression must not contain any symbols (branches, tags, change/commit
prefixes). Callers must not include RevsetExpression::symbol() in
the expression, and should instead resolve symbols to CommitIds and
pass them into RevsetExpression::commits(). Similarly, the expression
must not contain any RevsetExpression::remote_symbol() or
RevsetExpression::working_copy(), unless they’re known to be valid.
sourcepub fn resolve_user_expression(
self: Rc<Self>,
repo: &dyn Repo,
symbol_resolver: &dyn SymbolResolver,
) -> Result<ResolvedExpression, RevsetResolutionError>
pub fn resolve_user_expression( self: Rc<Self>, repo: &dyn Repo, symbol_resolver: &dyn SymbolResolver, ) -> Result<ResolvedExpression, RevsetResolutionError>
Resolve a user-provided expression. Symbols will be resolved using the
provided SymbolResolver.
sourcepub fn evaluate_programmatic<'index>(
self: Rc<Self>,
repo: &'index dyn Repo,
) -> Result<Box<dyn Revset + 'index>, RevsetEvaluationError>
pub fn evaluate_programmatic<'index>( self: Rc<Self>, repo: &'index dyn Repo, ) -> Result<Box<dyn Revset + 'index>, RevsetEvaluationError>
Resolve a programmatically created revset expression and evaluate it in the repo.
Trait Implementations§
source§impl Clone for RevsetExpression
impl Clone for RevsetExpression
source§fn clone(&self) -> RevsetExpression
fn clone(&self) -> RevsetExpression
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for RevsetExpression
impl Debug for RevsetExpression
source§impl PartialEq for RevsetExpression
impl PartialEq for RevsetExpression
source§fn eq(&self, other: &RevsetExpression) -> bool
fn eq(&self, other: &RevsetExpression) -> bool
self and other values to be equal, and is used
by ==.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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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