Force mergers

Is there a way to force branch A to branch B, where all possible conflicts will be resolved in favor of branch B?

In any case, how to push the last branch of the B-revision in branch A without the fuss about conflicts?

+8
mercurial
source share
1 answer

You can select one branch over another using hg merge --tool internal:other or hg merge --tool internal:local

I'm not sure how you want to merge, but if you want to merge A into B, accepting all the changes from B, you will do the following:

 > hg update B > hg merge A --tool internal:local > hg commit -m "Merge" 

The merge tool internal:local will accept the changes in the current version (which is B due to hg update B ) compared to the changes in the other version, internal:other will accept all the changes from A.

Use the following commands for more information: hg help merge and hg help merge-tools

+17
source share

All Articles