-
Notifications
You must be signed in to change notification settings - Fork 353
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
FR: Revset for divergent commits #4972
Comments
Related to the use-case in #4965, you could imagine wanting to clean up divergent commits by e.g. selecting whichever one has the most recent author/committer timestamp and abandoning the rest. [currently] In the current revset language, it may be quite difficult to express that:
[hypothetically] You can add more control structures and data types to the revset language to model imperative computations. I suspect the most natural approach would involve adding lambdas to the language, at least. [hypothetically] A logic programming or relational model might be able to express the above more straightforwardly than the current revset language seems to naturally support. For example, you could express this: and write [action item] We should catalogue any more use-cases that aren't served well by the current revset model, which might help us decide if we want to switch paradigms for the revset language. (Unless it turns out you can handle the above case directly, in which case ignore this and let me know how 😅.) |
Isn't this what Also, there's a feature request for "Make jj commands more composable" |
In the current design of
So the current Conceivably, someone could design |
Maybe I missed the point, but with the current revset language, this query might be expressed as |
I believe that's something different. Suppose you have In my case, I want to select only |
I mean we can set arbitrary domain within function arguments. For example, |
I'm skeptical that we want to invent a DSL for binary relations to represent the pairwise reduction just for |
I agree about that. It doesn't have to be a binary relation, but is still slightly different than revset expression (because the My feeling is that |
Sorry, I think I was unclear in what I was proposing. I agree that The specific example demonstrates a way that we can solve this class of problem with logic programming as a potential way to extend the language, as we don't have language features to solve the problem at present. Of course, it's possible to take many other approaches (imperative, functional, relational, etc.). I can make a separate issue to track it (EDIT: posted #4980). It came to mind for this issue because I thought to myself that I often want to operate on divergent commits in the way I mentioned in my original comment, but I can't do it with the current revset language. |
We apparently don't have a revset function for the set of divergent commits yet. We should add that.
This came up in #4965. Filing this to track it.
The text was updated successfully, but these errors were encountered: