Is there a way to get the equivalent of hg merge --preview with hg log and revsets?

I like to see what changes will occur when merging with hg merge --preview, but sometimes I would like to change the formatting a little or show only the commits that affect certain files or are committed by some people. There seems to be no way to specify a different log output format or apply any filters when used hg merge --preview, so I wonder if I can somehow get the same list of change sets with hg logand revsets. If I had this, I’m pretty sure that I can understand how to configure it as I like.

+5
source share
1 answer

You want all the shift ancestors with whom you are merging, excluding the common ones from the parent of your working directory:

$ hg log -r "ancestors (mergerev) - ancestors (.)"

or in short form:

$ hg log -r ":: mergerev - ::."

See hg help revsets for more information .

+5
source

All Articles