Merging branches is a complex operation in any version control system. The
merge operation in Bazaar combines the changes of another branch into the current branch, and copies all the revision metadata including the historical ordering information as well.
The default merge algorithm used by Bazaar is the so-called three-way merge. The first step in this algorithm is identifying the base revision of the two branches; that is, the point after which the branches have diverged. For example, given the following two branches, the base revision is
2, which is also the common ancestor of the two branches: