I like being able to see what changes will come in on a merge with hg merge --preview
but sometimes I wish I could change the formatting a bit, or show only commits that affect certain files, or commits made by certain people. Th开发者_如何学Goere appears to be no way to specify a different log output format or to apply any filters when using hg merge --preview
so I wonder if I can somehow get the same list of changesets using hg log
and revsets. If I had that I'm pretty sure I could figure out how to tweak it how I like.
You want all ancestors of the changeset you are merging with, excluding common ones with 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.
精彩评论