I have the three way merge window open in Mercurial:
local
base
other
hg update A
.hg merge B
I want to know what is local
, base
, and other
.
I read this How does the 3 way merge in Mercurial/Meld work? but could not get it.
Now I want to know which file from local
, base
, other
I need to save? Do I need to make all files the same? Will this change files in other branches or it will only save in my current branch A only, and other branches won't be touched?
In your example:
local
is the last changeset on branch A.other
is the last changeset on branch B.base
is the newest changeset which is an ancestor of the both branches.If you just do the commands that you listed above (hg update A
, hg merge B
) then you won't get a choice of which files to take because Mercurial will make that choice for you where it can.
The only time that you'll need to make a decision is if a file has been changed in both branches in a way that Mercurial can't automatically resolve. In that case, you'll be presented with your merge program of choice to resolve the conflicts. You have to look at the changes made in each branch and manually decide how they need to be combined. If another developer made one of the changes then you might need to ask them to help with the merge.
If you do hg update A
, hg merge B
then the only branch that will be affected is A.
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