In git, I can do the following:
git log foo ^bar
to show changesets in the branch foo
but not in the branch bar
. Is there a way to do that in Mercurial?
Edit: To explain a little more the use case. Say I have a branch in Mercurial (call it foo
) that is branched off of default
. What I want to know is what commits are in the foo
branch, and therefore haven't been merged to default
. Maybe I'm thinking of this the wrong way, but in git, I could start working on foo
, merge to master
and then work some more on foo
and use the command above to see which commits had yet to be merged in.
So a specific use case is knowing whether a branch has been completed merged into default. From using Mercurial, if I start a branch foo
off of default
to work on one feature, then leave it there so be merged and branch off of foo
to create bar
, which contains another feature built on top of things in foo
, foo
ends up being inactive because bar
contains all the changesets in foo, but I may want to merge just the changesets in foo
because I know those are good while bar
is still in development. Hopefully that's helpful.
to show changesets in the branch foo but not in the branch bar
hg log -r "::foo and not ::bar and ! destination(branch(bar)) and ! origin(branch(bar))"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With