开发者

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

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜