On Mon, 11 Jun 2001, SCHACHTER,MICHAEL (HP-NewJersey,ex2) wrote:
> Hi,
>
> Could someone clear this up for me? I'm not totally sure exactly what
> I'm doing at this point when I do a cvs commit. I'll assume that when I
> just do a normal commit to the jakarta-struts repository, that's the main
> branch. How do I send commits to and checkout the 1.0 branch? How do I
> know that a 1.0 branch exists, or a 1.1 for that matter?
>
You have to know by osmosis. :-)
By default, your commits only go to the HEAD branch of the CVS tree. What
we're doing here is using the HEAD branch for 1.1 development, and I
created a separate branch (at 1.0-beta-2 time) for what will finally be
the 1.0 release. This lets us go ahead and innovate on 1.1 (such as the
fact that I removed all the deprecated stuff) without messing up the
stability of 1.0.
What I normally do at times like this is to keep *both* branches checked
out, like this:
cd ~/Jakarta
cvs -d :pserver:craigmcc@localhost:/home/cvs checkout \
-r STRUTS_1_0_BRANCH jakarta-struts
mv jakarta-struts jakarta-struts-1.0
cvs -d :pserver:craigmcc@localhost:/home/cvs checkout jakarta-struts
mv jakarta-struts jakarta-struts-1.1
Now, CVS remembers the branch that each directory is checked out on, so
commits made in that directory go to the appropriate branch only. You've
probably seen me do the same commit twice (once on STRUTS_1_0_BRANCH and
once on the HEAD branch) -- by having to manually make the change twice.
In CVS terminology, the branch that you are on is known as the "sticky
tag" -- in other words, that branch identity "sticks to" the file when you
check it out. You can identify the stick tag for a given file by saying:
cd ~/Jakarta/jakarta-struts-1.0
cvs status build.xml
and you should see the stick tag STRUTS_1_0_BRANCH.
Craig