[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: branches and new files

From: Andrew Johnson
Subject: Re: Q: branches and new files
Date: Tue, 03 Dec 2002 13:15:14 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827

Lance Stephens wrote:

In general, we perform all our developement using branches. To do this, we perform the following steps:
1. cvs checkout ...
2. for each file to be modified, cvs edit (we use cvs watch)
3. modify files
4. for each file modified, cvs tag -b branch_name file_name (we do not create branch for entire project)

CVS is not designed to be used like that, your problems are occurring because you're trying to branch only the individual files. If you branch the whole project, or at least a directory at a time then your problem below is easy to solve. A CVS branch in a file with no modifications down that branch is really just a tag and is very light weight, so the overhead of branching files that you're not going to modify on that branch is miniscule.

5. for each new file, cvs add
6. for each file, cvs commit -r branch_name file_name (we do this for existing and new files).

In step 6, we commit added files to a branch. When i perform a cvs checkout to get the current baseline (no tags), neither the versions of the modified files or the added files can be seen (which is what we desire). As a build admin, i can then merge (cs update -j branch_name) the branch into my current release baseline, or into another branch (i.e., for a patch).

For step 6 to work properly, i must commit at least one modified file to the branch. The problem I have is when i want to just commit added files only, I can't commit them to a branch.

My Questions:
Since I cannot tag the added files before they are commited, how can I commit them to a branch? Is the committing of new files to a branch a CVS bug? If not, is the fact that I can't commit them to a branch when the tag does not pre-exist a bug? If you could do one, you "should" be able to do the other.
Is there any other way to do  this?

The advantage of branching the whole project (or at least a directory) at once is that you check out the branch, which makes the branch tag sticky in this sandbox (or at least this part of it). Now your added files will be put on the branch, because the directory they are in has the sticky branch tag.

Change your branching procedure, and your problem disappears.

- Andrew
"Life is what happens while you're busy making other plans." - John Lennon

reply via email to

[Prev in Thread] Current Thread [Next in Thread]