I have some anonymous branches in dev named branch that eventually will be merged into default branch. How do I find the latest changeset of dev branch that was already merged into default branch?
This is what I came up:
-
I started by showing all the merges in
defaultbranch:merge() and branch(default) -
What I really want is their parents in
devbranch:parents(merge() and branch(default)) and branch(dev) -
That gives me all the
devchangesets that were merged intodefaultbranch. Now I just addmaxto get the latest one. This is the final expression:max(parents(merge() and branch(default)) and branch(dev))
The problem is that I think that this query is too big. Is it possible to get this information with a simpler query?
I think that this will do it:
It gets the changesets on
devthat are the second parent of a changeset on thedefaultbranch and themaxgets the latest one.It’s only one condition shorter though (because the
p2condition effectively combines theparentandmergeof your query because you can’t be the second parent if you’re not a merge).