Find the latest merge point of two branches

后端 未结 7 2005
旧时难觅i
旧时难觅i 2021-02-01 05:16

Having two branches, how can I find the latest revision(s) where the two branches were merged? Is there a standard Mercurial command to do that?

This is the same as ques

7条回答
  •  温柔的废话
    2021-02-01 05:42

    You can rewrite this query to:

    • The closest single changeset that is an ancestor changeset of the tip of both branches

    Let's assume you have two branches, identified by R1 and R2, be it the name of the branches or the revision number or hash of a changeset in each, or whatnot.

    Then you can find the changeset you're looking for as:

    hg log --rev "ancestor(R1,R2)"
    

提交回复
热议问题