jj/lib
Yuya Nishihara e17fc89a8d revset: make filter node unary, move candidates to outer intersection
In order to optimize a query like '(author(_) | @) & main..', we'll probably
need a predicate form of an iterable set so that the query can be evaluated
to '(main..).iter().filter(author(_) | @)'. And if a predicate function can
terminate the source iterator early (by returning true/false/false_forever),
complexity of a filtered revset is basically the same as an intersection of
iterator pair. This means we can eventually merge IntersectionRevset with
FilterRevset.

With that in mind, this patch removes the redundant 'candidates' field from
the filter node, which would otherwise appear in the predicate function as
'candidates.contains(entry)'. A filter node with candidates was somewhat
useful while rewriting the tree, but that can be dealt with a view function
like as_filter_intersection() in this patch.

This also simplify the subsequent filter transformation as we no longer need
to test if candidates == All.
2022-12-05 00:32:18 +09:00
..
src revset: make filter node unary, move candidates to outer intersection 2022-12-05 00:32:18 +09:00
tests Rename FileConflictData to ConflictHunk, use it in files.rs. 2022-12-03 15:12:40 -08:00
testutils copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
build.rs copyright: change from "Google LLC" to "The Jujutsu Authors" 2022-11-28 06:05:45 -10:00
Cargo.toml thrift: add legacy-thrift Cargo feature 2022-12-03 22:31:02 -08:00