You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "SCHACHTER,MICHAEL (HP-NewJersey,ex2)" <ms...@hp.com> on 2001/06/12 04:33:34 UTC

Main Branch/1.0 Branch and CVS

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?

Re: Main Branch/1.0 Branch and CVS

Posted by Martin Cooper <ma...@tumbleweed.com>.
If you checked out your tree using:

cvs co jakarta-struts

then you checked out the main trunk, which is currently Struts 1.1 (or at
least post-1.0). When you do a checkin in that tree, it will go back into
the main trunk.

You can check out a branch using:

cvs co -rSTRUTS_1_0_BRANCH jakarta-struts

and then checkins from that tree will go into the branch.

You can check to see if you checked out a file in a branch by using:

cvs status <filename>

and looking at the "Sticky Tag" line. It will either say "(none)", which
means you are on the main trunk, or something like "STRUTS_1_0_BRANCH" if
you are on a branch.

You can see what branches are available by using:

cvs status -v <filename>

which will list all of the existing tags (for that file, but they will
usually be per-project anyway).

If you are using Windows, and use WinCVS, you can also use the Graph
command, which will show you a graphical version of the log, with labels
attached at branch and label points.

--
Martin Cooper


----- Original Message -----
From: "SCHACHTER,MICHAEL (HP-NewJersey,ex2)" <ms...@hp.com>
To: <st...@jakarta.apache.org>
Sent: Monday, June 11, 2001 7:33 PM
Subject: Main Branch/1.0 Branch and CVS


> 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?



Re: Main Branch/1.0 Branch and CVS

Posted by "Craig R. McClanahan" <cr...@apache.org>.

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