#!wml -o (ALL-LANG_*)+LANG_DE:\${}-de.html \ (ALL-LANG_*)+LANG_EN:\${}-en.html #use wml::mtp area=${area} ## Created on , 26 2001 by texi2html 1.65 ## Written by: Lionel Cons (original author) ## Karl Berry ## Olaf Bachmann ## and many others. ## Maintained by: Olaf Bachmann ## !!! Special Version for Using with WML by Karl Heinz Marbaise (khmarbaise@gmx.de)!!! ## Send bugs and suggestions to ## DO NOT EDIT THIS FILE EDIT FILE .... CVS--Concurrent Versions System: Merging a branch
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.6 Merging an entire branch

You can merge changes made on a branch into your working copy by giving the `-j branch' flag to the update command. With one `-j branch' option it merges the changes made between the point where the branch forked and newest revision on that branch (into your working copy).

The `-j' stands for «join».

Consider this revision tree:

 
+-----+    +-----+    +-----+    +-----+
! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !      <- The main trunk
+-----+    +-----+    +-----+    +-----+
                !
                !
                !   +---------+    +---------+
Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !
                    +---------+    +---------+

The branch 1.2.2 has been given the tag (symbolic name) `R1fix'. The following example assumes that the module `mod' contains only one file, `m.c'.

 
$ cvs checkout mod               # Retrieve the latest revision, 1.4

$ cvs update -j R1fix m.c        # Merge all changes made on the branch,
                                 # i.e. the changes between revision 1.2
                                 # and 1.2.2.2, into your working copy
                                 # of the file.

$ cvs commit -m "Included R1fix" # Create revision 1.5.

A conflict can result from a merge operation. If that happens, you should resolve it before committing the new revision. 10.3 Conflicts example.

If your source files contain keywords ( 12. Keyword substitution), you might be getting more conflicts than strictly necessary. See 5.10 Merging and keywords, for information on how to avoid this.

The checkout command also supports the `-j branch' flag. The same effect as above could be achieved with this:

 
$ cvs checkout -j R1fix mod
$ cvs commit -m "Included R1fix"

## This document was generated by Karl Heinz Marbaise on , 26 2001 using texi2html