ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib/tests
Yuya Nishihara 982062bd75 revset: do not always evaluate filter node to InternalRevset
This basically removes hidden 'all() &' from union/negation of filters. To
achieve that, I have two options: 1. add separate evaluation path (like the
one this commit introduced), or 2. wrap "all()" revset to override predicate
as Box::new(|_| true) function. I took the former since it's less ad-hoc.

We can add an explicit RevsetExpression node to branch between evaluate()
and evaluate_predicate(), but I don't think it would simplify the
implementation at this point. We might need such node if we want to resolve
"all()" at resolve_symbols(). It might be even better to extract a subset of
RevsetExpression enum, which only contains evaluatable nodes.

The cost of 'all() &' isn't significant for most filters. '~merges()' is
the exception. For jj repo,

    revsets/:v0.3.0 & (author(martinvonz) | committer(martinvonz))
    --------------------------------------------------------------
    base     1.06      11.2±0.04m
    new      1.00      10.5±0.05m

    revsets/~merges()
    -----------------
    base     1.69     750.0±8.47µ
    new      1.00     444.1±3.50µ
2023-04-04 15:21:21 +09:00
..
test_bad_locking.rs repo: replace load_at_head() by helper in tests 2023-02-27 09:44:28 -08:00
test_commit_builder.rs commit_builder: add accessors for most fields 2023-03-19 00:48:05 -07:00
test_commit_concurrent.rs repo: replace load_at_head() by helper in tests 2023-02-27 09:44:28 -08:00
test_conflicts.rs
test_default_revset_graph_iterator.rs revset: pass in store, index, and heads instead of whole Repo 2023-03-30 20:15:45 -07:00
test_diff_summary.rs
test_git.rs index: load store based on type recorded in .jj/repo/index/type 2023-03-11 22:22:46 -08:00
test_index.rs index: get generation number from specific impl in test 2023-03-24 10:09:40 -07:00
test_init.rs
test_load_repo.rs repo: propagate error when failing to look up backend type 2023-02-27 09:44:28 -08:00
test_merge_trees.rs
test_mut_repo.rs tests: avoid some unnecessary calls to index().stats() 2023-03-12 22:08:31 -07:00
test_operations.rs repo: implement Repo on ReadonlyRepo instead of its Arc 2023-03-21 21:43:44 -07:00
test_refs.rs
test_revset.rs revset: do not always evaluate filter node to InternalRevset 2023-04-04 15:21:21 +09:00
test_rewrite.rs
test_view.rs
test_working_copy.rs
test_working_copy_concurrent.rs
test_working_copy_sparse.rs
test_workspace.rs