Type Alias UserRevsetExpression

Source
pub type UserRevsetExpression = RevsetExpression<UserExpressionState>;
Expand description

RevsetExpression that may contain unresolved commit refs.

Aliased Type§

pub enum UserRevsetExpression {
Show 28 variants None, All, VisibleHeads, VisibleHeadsOrReferenced, Root, Commits(Vec<CommitId>), CommitRef(RevsetCommitRef), Ancestors { heads: Rc<RevsetExpression<UserExpressionState>>, generation: Range<u64>, }, Descendants { roots: Rc<RevsetExpression<UserExpressionState>>, generation: Range<u64>, }, Range { roots: Rc<RevsetExpression<UserExpressionState>>, heads: Rc<RevsetExpression<UserExpressionState>>, generation: Range<u64>, }, DagRange { roots: Rc<RevsetExpression<UserExpressionState>>, heads: Rc<RevsetExpression<UserExpressionState>>, }, Reachable { sources: Rc<RevsetExpression<UserExpressionState>>, domain: Rc<RevsetExpression<UserExpressionState>>, }, Heads(Rc<RevsetExpression<UserExpressionState>>), HeadsRange { roots: Rc<RevsetExpression<UserExpressionState>>, heads: Rc<RevsetExpression<UserExpressionState>>, filter: Rc<RevsetExpression<UserExpressionState>>, }, Roots(Rc<RevsetExpression<UserExpressionState>>), ForkPoint(Rc<RevsetExpression<UserExpressionState>>), Latest { candidates: Rc<RevsetExpression<UserExpressionState>>, count: usize, }, Filter(RevsetFilterPredicate), AsFilter(Rc<RevsetExpression<UserExpressionState>>), AtOperation { operation: String, candidates: Rc<RevsetExpression<UserExpressionState>>, }, WithinReference { candidates: Rc<RevsetExpression<UserExpressionState>>, commits: Vec<CommitId>, }, WithinVisibility { candidates: Rc<RevsetExpression<UserExpressionState>>, visible_heads: Vec<CommitId>, }, Coalesce(Rc<RevsetExpression<UserExpressionState>>, Rc<RevsetExpression<UserExpressionState>>), Present(Rc<RevsetExpression<UserExpressionState>>), NotIn(Rc<RevsetExpression<UserExpressionState>>), Union(Rc<RevsetExpression<UserExpressionState>>, Rc<RevsetExpression<UserExpressionState>>), Intersection(Rc<RevsetExpression<UserExpressionState>>, Rc<RevsetExpression<UserExpressionState>>), Difference(Rc<RevsetExpression<UserExpressionState>>, Rc<RevsetExpression<UserExpressionState>>),
}

Variants§

§

None

§

All

§

VisibleHeads

§

VisibleHeadsOrReferenced

Visible heads and all referenced commits within the current expression scope. Used as the default of Range/DagRange heads.

§

Root

§

Commits(Vec<CommitId>)

§

CommitRef(RevsetCommitRef)

§

Ancestors

Fields

§heads: Rc<RevsetExpression<UserExpressionState>>
§generation: Range<u64>
§

Descendants

Fields

§roots: Rc<RevsetExpression<UserExpressionState>>
§generation: Range<u64>
§

Range

Fields

§roots: Rc<RevsetExpression<UserExpressionState>>
§heads: Rc<RevsetExpression<UserExpressionState>>
§generation: Range<u64>
§

DagRange

Fields

§roots: Rc<RevsetExpression<UserExpressionState>>
§heads: Rc<RevsetExpression<UserExpressionState>>
§

Reachable

Fields

§sources: Rc<RevsetExpression<UserExpressionState>>
§domain: Rc<RevsetExpression<UserExpressionState>>
§

Heads(Rc<RevsetExpression<UserExpressionState>>)

§

HeadsRange

Heads of the set of commits which are ancestors of heads but are not ancestors of roots, and which also are contained in filter.

Fields

§roots: Rc<RevsetExpression<UserExpressionState>>
§heads: Rc<RevsetExpression<UserExpressionState>>
§filter: Rc<RevsetExpression<UserExpressionState>>
§

Roots(Rc<RevsetExpression<UserExpressionState>>)

§

ForkPoint(Rc<RevsetExpression<UserExpressionState>>)

§

Latest

Fields

§candidates: Rc<RevsetExpression<UserExpressionState>>
§count: usize
§

Filter(RevsetFilterPredicate)

§

AsFilter(Rc<RevsetExpression<UserExpressionState>>)

Marker for subtree that should be intersected as filter.

§

AtOperation

Resolves symbols and visibility at the specified operation.

Fields

§operation: String
§candidates: Rc<RevsetExpression<UserExpressionState>>
§

WithinReference

Makes All include the commits and their ancestors in addition to the visible heads.

Fields

§candidates: Rc<RevsetExpression<UserExpressionState>>
§commits: Vec<CommitId>

Commits explicitly referenced within the scope.

§

WithinVisibility

Resolves visibility within the specified repo state.

Fields

§candidates: Rc<RevsetExpression<UserExpressionState>>
§visible_heads: Vec<CommitId>

Copy of repo.view().heads() at the operation.

§

Coalesce(Rc<RevsetExpression<UserExpressionState>>, Rc<RevsetExpression<UserExpressionState>>)

§

Present(Rc<RevsetExpression<UserExpressionState>>)

§

NotIn(Rc<RevsetExpression<UserExpressionState>>)

§

Union(Rc<RevsetExpression<UserExpressionState>>, Rc<RevsetExpression<UserExpressionState>>)

§

Intersection(Rc<RevsetExpression<UserExpressionState>>, Rc<RevsetExpression<UserExpressionState>>)

§

Difference(Rc<RevsetExpression<UserExpressionState>>, Rc<RevsetExpression<UserExpressionState>>)

Implementations§

Source§

impl UserRevsetExpression

Source

pub fn resolve_user_expression( &self, repo: &dyn Repo, symbol_resolver: &SymbolResolver<'_>, ) -> Result<Rc<ResolvedRevsetExpression>, RevsetResolutionError>

Resolve a user-provided expression. Symbols will be resolved using the provided SymbolResolver.