PDA

View Full Version : ClearCase directory branches


Ralf
07-01-2003, 12:57 PM
Hi

We recently switched to ClearCase and now we wonder whether we should
use ClearCase's directory branching feature or not.
To me, directory branching seems quite natural, because it is the
ClearCase's standard mode of operation and it is also used by UCM. I
like the idea of being completely insulated from changes made by other
developers and I prefer to see only the files that I need to see on my
activity branch (to those who don't know -- an activity branch is a
temporary branch on which a developer implements a well-defined
change; the activity branch is later merged back to the integration
branch).

Some people claim that instead of branching directories, you should
rather keep all of your directory versions on your integration line
and only branch *files*. Thus, all developers working on activity
branches would see the same directory contents (even though the file
versions in a directory would be different). They fear that with
directory branching, developers can easily create the same file twice
on different branches, resulting in merge problems later on.

So my question is: What are the advantages/disadvantages of directory
branching?

Regards,

--Ralf

David Masterson
07-02-2003, 02:25 PM
>>>>> Ralf writes:
Some people claim that instead of branching directories, you should rather keep all of your directory versions on your integration line and only branch *files*. Thus, all developers working on activity branches would see the same directory contents (even though the file versions in a directory would be different). They fear that with directory branching, developers can easily create the same file twice on different branches, resulting in merge problems later on.
So my question is: What are the advantages/disadvantages of directory branching?

Directory branching is (IMHO) one of the benefits of ClearCase and,
so, should not be thrown away lightly. You can run into the problem
you mention if you do things without thought. In general, the natural
management of projects prevent it from happening, though. That is, in
general, each directory represents a separate project with owners and
developers and the like. These people will all view the directory
based upon the same (or very similar) config-specs and, thus, their
changes to the directory (new files, moved files, delete files) will
be visible *almost* immediately to all the other developers in the
project. I say almost in that the change will not (really) be visible
until the directory is checked-in. Now, you might think that two
people could still have the directory checked out at the same time,
but that is where "reserved" comes in to prevent others from changing
it during a "special" time. Plus, since this is a project, the people
working on the project should be communicating with one another.
Finally, if you're still worried about duplicate elements, you can put
a trigger into place to prevent it. See the ABS web-site:

http://www.abs-consulting.com/

--
David Masterson David DOT Masterson AT synopsys DOT com
Sr. R&D Engineer Synopsys, Inc.
Software Engineering Sunnyvale, CA

Kevin Cline
07-09-2003, 07:06 AM
ralf.holly@web.de (Ralf) wrote in message news:<955dc2ae.0307011257.1592f931@posting.google.com>... Hi We recently switched to ClearCase and now we wonder whether we should use ClearCase's directory branching feature or not. To me, directory branching seems quite natural, because it is the ClearCase's standard mode of operation and it is also used by UCM. I like the idea of being completely insulated from changes made by other developers and I prefer to see only the files that I need to see on my activity branch (to those who don't know -- an activity branch is a temporary branch on which a developer implements a well-defined change; the activity branch is later merged back to the integration branch). Some people claim that instead of branching directories, you should rather keep all of your directory versions on your integration line and only branch *files*. Thus, all developers working on activity branches would see the same directory contents (even though the file versions in a directory would be different). They fear that with directory branching, developers can easily create the same file twice on different branches, resulting in merge problems later on. So my question is: What are the advantages/disadvantages of directory branching?

Directory branching is good; otherwise you end up dragging around a
lot of dead files. But things can get really confusing if you end up
adding the same file in different branches, and end up with multiple
elements with the same path. My recommendation is to write a mkelem
trigger to prevent this. Then write a script that will create a link
or an element as desired.


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service