-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: op log: add --bookmark
option to filter operations by bookmark
#5316
base: main
Are you sure you want to change the base?
Conversation
9494f02
to
bb8ff6d
Compare
I've wrote a preliminary version of this feature, which allows filtering op log entries by bookmark. Unfortunately it's not very performant, because it requires doing a toposort of the whole op log before filtering out irrelevant entries. In contrast, the plain (unfiltered) op log has a lazy iterator to go through linear portions of the graph, which I think would be large portions of the graph for most. I'm not sure if there is a way to correctly construct the graph with elided revisions in a lazy manner? My understanding (do correct me if I'm wrong) is that the regular I'm also not that familiar with graphs, so perhaps there are better algorithms for this? |
bb8ff6d
to
824aa3c
Compare
2738323
to
0f7cee6
Compare
824aa3c
to
126517c
Compare
Maybe we can apply the same workaround as the lazy iterator? It just splits the graph into linear and non-linear parts, and processes non-linear part eagerly. FWIW, we'll need opset language at some point, but adding |
I was thinking the same, but I'll probably need a bit more time to go through the code to understand and adapt the algorithm.
I also wanted to add the ability to filter by change ID, so perhaps the opset language might come in sooner rather than later? |
This will be used in a subsequent commit to allow rendering elided nodes in the operation log.
This allows a graph to be constructed in reverse toplogical order, while allowing nodes to be filtered out.
126517c
to
c9987ae
Compare
Since op log is usually linear, it's probably okay to not implement
It might be also okay to add minimal opset parser (something like |
Is the eventual intention to get something like
This is referring to the code in Unless we intend to create an operation store index, I was thinking we could attempt to resolve any resolvable ops in the opset first (apart from |
Yes, it's nice if
I meant
I think most part of "opset" expression will be transformed to |
Checklist
If applicable:
CHANGELOG.md