@need 3200

@node Synchronizing Two Branches
@chapter Synchronizing Two Branches

@geindex make-sync-tree



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:

@example
@group
        % larch make-sync-tree from-revision to-version [dir]
@end group
@group
@end group
@end example

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


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




