We do something similar to this:
For each branch we create three tag names, one for the branch itself,
one so we have a snapshot of the source at the time when the branch
was taken and one to allow engineering team leaders to approve of
changes.
To create the snapshot we add "_BP" (for Branch Pointer) to the branch
tag name. The <New_Branch_Name>_BP is never supposed to change. It
allows easy comparisons of changes made on files since the file was
branched. The old tag would also work for this but someone could easily
tag a different revision of the file with this tag afterwards. While
this is true for a _BP tag also the developers know to keep their hands
off of _BP tags. Tagging filters can also be written to enforce this.
For the approved code we have a tag with "_TAG" added to the branch
tag name. A developer will check in code to the branch and the team
leader approves it for a build by tagging it
i.e., cvs tag -F <New_Branch_Name>_TAG <file>
All builds are done by checking out the approved files
i.e., cvs co -r <New_Branch_Name>_TAG <<ModuleName>
When creating the branch we use "rtag" instead of "tag" so we do not
bother
checking out the files.
We create the snapshot first and then create the approved version of
the files from the snapshot. Then the branch is created from the
snapshot. This looks like it is being done backwards but it works.
Here are example commands:
cvs rtag -r <Old_Tag_Name> <New_Branch_Name>_BP <ModuleName>
cvs rtag -r <New_Branch_Name>_BP <New_Branch_Name>_TAG <ModuleName>
cvs rtag -b -r <New_Branch_Name>_BP <New_Branch_Name> <ModuleName>
[EMAIL PROTECTED] wrote:
>
> I need to figure out a way to create a branch off of an earlier tag.
> We created a tag last week, when what we needed to do was create a
> branch. Now files have changed, so it doesn't make any sense to
> branch now, but we also can't lose those changes. Basically, I need
> to go back in time and create a branch. Does CVS support time
> travel? :)
>
> If I do a "cvs checkout -r tagname" and then a "cvs tag -b
> branchname" will this create a branch from the tag? We've been on
> CVS now for about 2 1/2 years, but this is the first time we've
> needed to try and branch.
>
> I searched for this question, but wasn't able to find anything. I
> apologize if this question has been asked and answered before.
>
> Thanks!
>
> matt.