Mercurial requires an explicit merge step, even if the merge turns out
to be trivial. In some cases, when you pull, you do not want to merge.
An extension called FetchExtension provides an hg fetch command to
automate the pull/merge/commit process in the case of trivial merges.
We use the hg heads command to see the two heads (two branches of development),
one from our local repository at trunk and the other from trunk-newcolors. The
merge step using hg merge is simple, and in this case, it is a trivial merge (without any
conflicts). Had there been conflicts, hg merge would have attempted to find a threeway
merge tool such as FileMerge or kdiff3 to help us resolve the changes. When the
merge is complete and we have approved it, we need to commit the merge.
$ hg heads
changeset: 2:18bb8b07ec40
tag: tip
parent: 0:65aca7b5860a
user: Brad Ediger
date: Fri Oct 26 13:08:01 2007 -0500
summary: Changed red to blue in main stylesheet
Version Control | 305
changeset: 1:800424c888ed
user: Brad Ediger
date: Fri Oct 26 13:08:57 2007 -0500
summary: added another CSS class
$ hg merge
merging public/stylesheets/main.css
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -m "Merged"
The newly committed merge shows the two changesets from earlier as its parents:
$ hg tip
changeset: 3:5f98ca15ccbc
tag: tip
parent: 1:800424c888ed
parent: 2:18bb8b07ec40
user: Brad Ediger
Pages:
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463