How to get last n ancestors as revset #1984
-
I'm trying to figure out how to do the equivalent of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The revset engine already knows how to do it, so I think it's just a matter of updating the Lines 946 to 950 in b19bf37 I'm not sure exactly what the syntax should be. Mercurial has There's also support in the revset engine for descendants in a specified range, so it shouldn't be hard to add syntax for that too. Do you feel like implementing any of that? |
Beta Was this translation helpful? Give feedback.
The revset engine already knows how to do it, so I think it's just a matter of updating the
ancestors()
function to accept a generation range (@yuja can correct me if I'm wrong). That code is here:jj/lib/src/revset.rs
Lines 946 to 950 in b19bf37
I'm not sure exactly what the syntax should be. Mercurial has
ancestors(x, n)
to give up to n generations up to the specified distance. I think it makes sense to copy that. We could also acceptancestors(x…