I try to merge:
hg me -r <some-revision>
and get:
<some-file>: ambiguous merge - picked m action
What does it mean?
This message comes from the merge code when it is handling a "difficult" merge, where there is no "best" lowest common ancestor (LCA) commit in the commit graph. (Instead, there are at least two LCAs—or exactly two in this case since it's tricky to get more than two and I don't think Mercurial can.) If you run with verbose or debug messages enabled, you will see several messages regarding the "bid merge" process. Bid merge is described (not very well, in my opinion) in https://www.mercurial-scm.org/wiki/BidMerge.
The message you saw indicates that the bid-merge algorithm was unsuccessful at choosing a "best ancestor" and Mercurial fell back on its "choose an ancestor at (apparent) random" method.
The lack of a "best LCA" arises from "criss cross merges", where you merge branch A into B and branch B into A. Without such merges there is always a single best LCA, if there is any LCA at all. This does not mean you must avoid such merges, but it does mean you should be aware that if you do make them, you may run into ambiguous merge-base issues.
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