It's not as simple as that. What you describe is the CVS join command:
    CVS update -j <branchname> <filename(s)>

What this does: merge all changes in the specified branch into the current
branch.
In general this is undesirable for these reasons:
- There may be additional changes in the specified branch that you don't
want to be merged.
- If a change has already been made in both branches, it will be merged into
the present branch a second time - which is certainly not wat you want.
- This happens also when merging from the same branch several times, as some
changes will be merged repeatedly.

One way to avoid these problems is by specifying revisions manually:
    CVS update -j <revision1> -j <revision2> <filename(s)>
This merges changes between the specified revisions to the current branch.

For more info, see chapter 5. "Branching and merging" from the CVS Manual:
http://www.cvshome.org/docs/manual/cvs_5.html#SEC54



----- Original Message -----
From: "Kees Jongenburger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 7:44 AM
Subject: small note about cvs branches


Hi,

it seams people have trouble keeping there changes up to date in the 2/3
branches of cvs. it's realy not that difficult.

first of all: try to work on the branch that needs the fix. (if you are
fixing
something for 1.6, debug in 1.6)

After you tested the stuff commit it to the cvs

After that for every other branch you want the patch to be made make shure
you
have a checkedout version of this branch (like HEAD)
from that branch goto the directory / you made the changes and to a
cvs update -j TheOtherBranch File

So for 1.6
if you fix something in the MMBase-1_6 branch and want the changes to go
into
the cvs HEAD
goto the HEAD branch
and type
cvs update -j MMBase-1_6 MyFile.java

if you fixed something in cvs HEAD and want the changes to go into the 1.6
distro
checkout the MMBase-1_6 branch
goto the right file
and type
cvs update -j HEAD MyFile.java

You have just commited the file to an ohter branch I think you shoud test if
the fix works on the branch. We don't have rulez yet for testing, but if you
merge data from HEAD to the 1.6 branch make shure everything compiles and
works the way it's expected to. This is the reason why you should start
fixing/changing things in the right branch.

anyway.. cvs merge .. use it:)




Reply via email to