Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial - differences merging repository A->B vs B->A?

Given repository A and repository B (created off a clone of changeset A2):

A1 - A2 - A3 - A4 - A5
        \
          B3 - B4

Say we wanted to merge these two repositories together. Is there any difference if we merged repo B into repo A versus merging repo A into repo B?

The only diff I can think of is the merge tool local/base arguments would be reversed depending on which option you chose. Are there any other differences to be aware of?

like image 842
Marcus Leon Avatar asked Apr 08 '11 11:04

Marcus Leon


1 Answers

Generally merges are symmetric, with a few exceptions:

  • If the merged heads are from different named branches, the order is important. The merge revision will be on the first parent's branch.
  • Starting with Mercurial 1.8.4 the same applies to bookmarks, i.e. only the bookmark
    of the first parent will move forward to the merge revision.
  • The order of the merge revision's parents in log and diff views is different, but that doest not have any noteworthy practical implications (from my experience).
like image 128
Oben Sonne Avatar answered Oct 21 '22 16:10

Oben Sonne