Enum jj_lib::revset::RevsetExpression
source · pub enum RevsetExpression {
Show 18 variants
None,
All,
Commits(Vec<CommitId>),
CommitRef(RevsetCommitRef),
Ancestors {
heads: Rc<RevsetExpression>,
generation: Range<u64>,
is_legacy: bool,
},
Descendants {
roots: Rc<RevsetExpression>,
generation: Range<u64>,
is_legacy: bool,
},
Range {
roots: Rc<RevsetExpression>,
heads: Rc<RevsetExpression>,
generation: Range<u64>,
},
DagRange {
roots: Rc<RevsetExpression>,
heads: Rc<RevsetExpression>,
is_legacy: bool,
},
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
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 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 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
, including self
until generation
back.
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
, including self
until generation
ahead.
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.
pub fn legacy_dag_range_to( self: &Rc<RevsetExpression>, heads: &Rc<RevsetExpression> ) -> Rc<RevsetExpression>
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 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 CommitId
s 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 ==
.