The Hackerlab at `regexps.com`

## Synchronizing Two Branches

up: arch prev: Multi-Branch Merging -- The reconcile Command

Suppose that you have two branches, for example a primary development line and a developer branch from that trunk. For one reason or another, none of those changes which are on the developer branch but not the trunk are needed -- perhaps similar changes have recently been made on the trunk.

Now the developer wants to merge the trunk back to his branch, but the desired outcome of this merge is quite trivial: he wants the source in the branch to wind up looking exactly like the source in the trunk, but the patch log in the branch to have all log entries from both the trunk and the branch. In short, it should appear that after diverging, the branch was later editted to agree with the trunk on how to make the branch's changes.

There is a command for this situation:

            % larch make-sync-tree from-revision to-version [dir]

This creates a project tree for `to-version` whose source code is exactly the same as `from-revision` but whose patch log is a combination of the latest patch log from `to-version` and the patch log of `from-revision` .

The project tree thus created can be committed to `to-version` , resulting in in a perfect synchronization between two branches.

arch: The arch Revision Control System
The Hackerlab at `regexps.com`