Unified Change Management (UCM) introduces the idea of a project object, a collection of streams and policies, generally organized around a deliverable body of work. Now we need some organizing principles around projects.
In this example, Harvest Magic is an up-and-coming software company focusing on automated harvesting. They have two products so far, Wheat Magic and Corn Magic. The common code is encapsulated into a harvest framework. Figure 1 shows an organization of projects within the IBM® Rational® ClearCase® Project Explorer.
Figure 1. Typical organization of a released-based project set
Each project set is segregated by a folder. For products that have explicit release cycles, the use of release-based projects is typical. Here the Wheat Magic product has two releases in play: Release 1.0 and Release 2.0. There is also a main project, which will be discussed shortly.
The follow-on project
After Release 1.0 goes to beta, a group of senior engineers are spun off to begin development on Release 2.0. For this parallel development effort, a new project, Wheat Magic Release 2.0, is created based on the recommended baseline used for Release 1.0 beta.
The UCM Project Creation wizard provides an easy mechanism to create these follow-on projects. The second step of the wizard asks the question,"Would you like to see this project with the recommended baseline from a stream in an existing project?"
If you select Yes, the wizard will prompt you to pick a specific stream, in this case the Integration Stream of the Release 1.0 project. By default it will pick up the recommended baseline and all the project rules from the selected project. Just what you want. Almost.
The problem of ever-cascading projects
A standard follow-on project works great for the follow-on project of a first release. But fast-forward a few releases and the version tree starts to get messy with ever-cascading streams. Listing 1 shows a file listing from the fourth release.
Listing 1. Extended pathname in a fourth-generation follow-on project
cleartool ls husker.cpp husker.cpp@@\main\wh_magic_1.0_Integration\wh_magic_2.0_Integration \wh_magic_3.0_Integration\wh_magic_4.0_Integration\5
Some applications will break trying to use excessively long pathnames. In addition, the version tree becomes more and more difficult to cipher. Both problems can be fixed using a mainline project.
The mainline project
Instead of cascading projects one after another, use the mainline project as a release anchor. Here’s how it works.
When you’re ready to begin work on a new release:
- Deliver the latest baseline from the exiting project to the mainline project
- Create a baseline in the mainline project
- Use the mainline as the base for your follow-on project
Using a mainline project as an anchor caps the depth of your streams. Listing 2 shows the same file using the mainline project:
Listing 2. Same pathname using a mainline project
cleartool ls husker.cpp husker.cpp@@\main\wh_magic_mainline\wh_magic_4.0_Integration\5
Another important contribution of the mainline project is in organizing a more readable version tree. From the version tree shown in Figure 2, it is fairly easy to see that:
- The file originated in Release 1.0
- BL5_A1 was the base for the mainline anchor for Release 3
- Release 3 does not yet include the latest work on Release 2
- Release 3 does not yet include the latest code set from Release 2
Figure 2. Using a mainline project to organize releases
Also note the relationship between BL_A1 and the 3.0_init baseline. Can you tell by looking that the content of these files are identical?
The only changes made between the 2.0_init and 3.0_init baseline were changes introduced by the BL5_A1 baseline, so this will, by definition, be a trivial merge. This is what you count on to use mainline projects as anchors.
Getting started - creating the mainline project
Let’s walk through creating and using a mainline project for the new product Corn Magic.
Step 1: Create the mainline project
Since you will never be doing development on the mainline project, make the project single-stream, as shown in Figure 3.
Figure 3. Defining the mainline project
It is recommended to rename the integration stream to mainline as a reminder that this is a special-purpose project.
Step 2: Allow the inter-project delivers
By default, inter-project deliveries are not allowed. Turn them on for the mainline project, as shown in Figure 4.
Figure 4. Allow inter-project delivers
Use the standard defaults for the rest of the project definition.
Seeding a project using the mainline
The initial mainline project is now available for use. Figure 5 shows you how to create a project based on this mainline. Select Yes to seed the project based on a recommended baseline and browse to the mainline stream of the main project, here
Figure 5. Using the mainline project to seed a new release
Defining a default delivery target
When you are ready to begin your next follow-on project, first seed the mainline with your latest recommended baseline. To facilitate this step, set the default delivery target to the mainline during project setup, as shown in Figure 6.
Figure 6. Setting the integration stream to deliver to the mainline
Use the standard defaults for the rest of the project definition.
Delivering to the mainline
The Release 1.0 project is created and used. Eventually you are ready to set up parallel development and begin work on the next release. Since you have already set up a delivery default, just deliver the last recommended baseline to Default, as shown in Figure 7.
Figure 7. Delivering the latest baseline to mainline to seed the next project
Starting now is OK
It is never too late to create a mainline project. You can start using this technique the next time you’re ready to create a new release project. We often see mainline projects pop up at sites that have been using UCM for several years.
- Software Configuration Management Strategies and IBM Rational ClearCase: A Practical Introduction (2nd edition, IBM Press 2005) by David Bellagio and Tom Milligan provides a comprehensive review of CM strategies and practices with a UCM focus. This second edition is the updated and expanded version of Brian White’s popular book.
- The IBM Redbook Software Configuration Management: A Clear Case for IBM Rational ClearCase and ClearQuest describes configuration management in general and how it is implemented in IBM Rational ClearCase and ClearQuest.
- Software Configuration Management Patterns: Effective teamwork, Practical Integration defines a pattern as "a solution to a problem in context." The mainline project is a simple example of a Configuration Management [CM] pattern. In this book, Bercuzuk and Appleton provide the definitive reference to CM patterns. This book is targeted at the more advanced CM practitioner.
- Learn more about change and configuration management at the Safari Bookshelf, a fully-searchable virtual library that houses a vast collection of technical books from industry-leading publishers..
Get products and technologies
- Find more resources for ClearCase users and administrators in the ClearCase area of the developerWorks Rational zone, including articles and whitepapers, plug-ins, scripts and triggers; and links to training, discussion forums, product documentation and support.
- ClearQuest users and administrators can find more resources in the ClearQuest section of the developerWorks Rational zone, including ClearQuest hooks, Eclipse plug-ins, product documentation, articles and whitepapers.
- To learn more about IBM Rational products, visit the developerWorks Rational zone. You'll find technical documentation, how-to articles, education, downloads, product information, and more.
- The ClearCase discussion forum on developerWorks is a great place to post questions and get answers about configuration management and UCM with IBM Rational ClearCase.
- To post questions and participate in discussions about change management with IBM Rational ClearQuest, see the ClearQuest discussion forum on developerWorks Rational.
- Find a user group in your area from the Rational Global User Group Community. Rational User Groups are independent, user-run organizations that provide an open forum to promote information exchange between customers and Rational staff.