This step-by-step guide describes how to deliver your work in an IBM® Rational® ClearCase® Unified Change Management (UCM) development environment that is running on the UNIX® platform. Delivering changes or additions to an integration stream is a critical operation in any project, but it assumes more significance when developers are accessing the same code base from different locations. This guide for application developers can serve as a reference in any project and will be helpful at both the beginner and the intermediate levels.
Note:
If your project uses IBM® Rational® ClearCase MultiSite®, you must use a different method for your activities. Please consult your ClearCase project administrator in that case. See About deliveries in a Rational ClearCase MultiSite project for a brief overview. More details are available from ClearCase documentation and the Help section that is available within the software.
This article is based on the assumption that readers know basic ClearCase UCM concepts and operations from a developer's point of view. If you are not familiar with ClearCase UCM, you can review documentation and the tutorial in your version of Rational ClearCase. You might also consider taking the Web course, "SCM215: Essentials of IBM Rational ClearCase UCM for Developers" (see Resources for a link to the catalog of all courses).
In a Rational ClearCase multistream development environment, if you want to make your work visible to others working on the project and to make the work part of the final deliverable, you need to deliver your activities to the project's shared integration area. To do that, you will complete these tasks:
- Rebase to the latest recommended baseline
- Rebuild the entire system
- Make sure that no one else is delivering simultaneously
- Deliver your work to the integration stream
- Compile everything and complete the delivery
- Inform the team of the delivery
Rebase to the latest recommended baseline
As a first step, a rebase operation needs to be performed before making a delivery. A rebase operation to the project's latest recommended baseline brings the developer's stream up-to-date with the last successful code in the integration stream (or what has been delivered until that point). Because a rebase operation cannot start from a view that has checked out files, make sure that everything is checked in to your development view. Or, if you prefer disregarding your changes, cancel the checkouts.
To see the list of files and directories that are checked out to your development view, type this command:
cleartool lscheckout -cview -me |
To start the rebase operation, use one of the following methods after accessing your development view:
- At the system prompt type:
cleartool rebase -graphical
- In the ClearCase window, select the menu item "Rebase ..." and the following window opens.
Figure 1. Rebasing to the project's recommended baseline
The recommended baseline is shown by default. If this is not what you expected or if you believe that a different baseline exists, then make a selection by clicking the "Advanced" button. Next, make sure a view is selected. Select your own development view in the list and click OK. To start the rebase operation, click OK.
During a rebase operation, merging of files from the integration stream to your development stream can occur if there is a difference between the code base on the project's integration stream and your development stream since the last rebase. Rational ClearCase performs all nonconflicting merges of files and directories that are ClearCase elements.
If for a particular file the same lines have been updated on both streams, then during the rebase operation, a merge conflict is encountered and the merge editor opens for you to resolve the conflict by selecting the required lines.
After the conflict is resolved, the rebase operation continues to completion, although there can be more merge conflicts that will need to be resolved.
Important:
Do not press Complete yet.
- Keep the rebase window, without clicking the Complete button.
- In a separate terminal window, enter into your development view, and run the following two commands:
clearmake clean
which erases all cache directories and temporary files (such as object files).
clearmake all
which rebuilds the project
If the compilation fails, you need to find the error and where your code changes are not compatible with those in the baseline version. The most probable causes are accidental inclusion of unwanted characters in the source files during the merge, a missing symbolic link, not making new files or directories as versioned object base (VOB) elements, or even incorrect selection of a piece of code during manual resolution of merge conflicts. Generally, these errors are quite easy for a developer to spot.
If the compilation succeeds, finish the rebase operation by clicking Complete. If you had closed the Rebase window, reopen it by selecting Rebase again and choosing Resume.
If you need to back out of the rebase operation -- that is, to undo or abort it -- access your development view and, at the system prompt, type this command to cancel the checkouts performed during the rebase operation and remove all merge arrows:
cleartool rebase –cancel |
Note:
Unless you click the Complete button, the ClearCase files that were altered during the rebase operation remain in a checked-out state.
Tips:
- Frequent rebasing causes your development work to be introduced in smaller chunks, rather than in one big chunk. This reduces the number of merges and also helps to identify integration problems early.
- Do not deliver anything to the integration stream unless you are absolutely certain that everything compiles on your developer substream.
Make sure that no one else is delivering simultaneously
After the rebase operation is finished, you can proceed with the delivery operation. Make sure that you have exclusive access to the integration stream before you start the delivery. It is important that no one else is delivering their work to the integration stream while your delivery is in progress. One way to ensure this is to write a trigger on the integration stream that will lock the stream until the delivery finishes. Another option is to set a flag that reserves the delivery operation on the project's internal wiki or intranet and send e-mail to all of the developers, notifying them to delay their deliveries until yours is complete.
Tip:
If more than one person is working on the same feature, task, or problem, it is a good idea to share a stream and work on individual views in the stream. This way, developers can share their changes instantly just by checking in their files.
Deliver your work to the integration stream
During this process you are updating the project's integration stream with the work that you did on your development stream. In projects where multiple deliveries are performed before a baseline is created, you are actually appending your work to the integration stream after what others delivered since the latest recommended baseline. This introduces the possibility that new merges might be required that were not encountered during the rebase operation. However, the chance of this happening can be minimized if several builds are done during the day.
- To deliver your work to the integration stream, use either of these methods:
- At the system prompt, access your development view and type:
cleartool deliver -graphical
- In the ClearCase window, select the menu item Deliver from stream > To Default.
The default target is the parent of your development stream. This is the normal practice for most project policies.
In the delivery process, you have the option of choosing to deliver your work by specifying one or more activities or baselines to be delivered. Accordingly, the delivery operation identifies the activities or the baselines that are candidates and shows them in the Deliver Preview window (see Figure 2).
Figure 2. Delivering your work to the integration stream
- In a single-project environment, you will usually be working on activities and delivering them after completion. You can select or clear these activities as necessary, but make sure to take care of any dependencies among the activities when you make a selection.
- Check that the "Delivering to Target" information, namely the project, the stream, and the view where the activities will be delivered, is correct.
- Click OK to start the deliver operation. The progress information is displayed. As with the rebase operation, solve merge conflicts as they are found.
At the end of all merges, the following message is displayed: "The changes will not be made permanent until you click on the 'Complete' button below."
Important:
Do not click Complete yet.
Compile everything and complete the delivery
Now it is time to compile the entire project again. Doing so ensures that the new merges that took place during the delivery operation did not introduce any accidental errors and does not cause the build to fail on the integration stream. You cannot deliver something that cannot compile and build properly.
- In a separate terminal window, select an integration stream view (not your development view) and run a command:
clearmake all
- If there are any compilation or integration problems, then these issues need to be resolved before completing the delivery. Fixes involving any trivial changes may be done in the integration stream itself. Incase of any major changes, the same should be done in the developer's stream and the deliver operation should be cancelled. Any source code or files required to fix these compilation problems should be communicated to the entire team, especially to the respective file owners.
- After the entire project compiles successfully, click on Complete.
You will then see this message: "The Deliver operation was done successfully."
Note:
As in the rebase operation, unless Complete is selected, the ClearCase files that changed during the delivery operation remain in the checked-out state.
Tips:
- Activities should not be reused after a delivery operation. Instead, create a new activity with the same name as the previous one, but add _1_ near the end.
For example:[UserID]_[FeatureName]_[TaskName] _1_actv
- Delete the temporary snapshot view when you are finished with it. Your machine resources are heavily burdened if you have a large number of views.
Inform the team of the delivery
- After the successful delivery, send an e-mail message with exact information to the entire development team and the Release Manager. This e-mail should contain information about:
- The feature that you have implemented.
- Major merge conflicts and the files that were changed, if any
- If you had set a flag for reserving the delivery operation on the project's internal wiki or intranet, release the flag to give others the opportunity to deliver their work.
Depending on the complexity of the feature or the volume of code changes introduced during this delivery, the Release Manager might want to either make a new recommended baseline for the project before the next delivery or allow the next delivery to take place on the same baseline.
In some project scenarios, a script might also run in the background that automatically advances the project's recommended baseline after a delivery.
Learn
- Learn more about ClearCase:
- For technical information and other resources for developers, see the Rational ClearCase product page.
- Visit the Rational ClearCase area on developerWorks for articles and tutorials.
- Find answers to terminology questions in the ClearCase Glossary.
-
Learn about other applications in the IBM Rational Software Delivery Platform, including collaboration tools for parallel development and geographically dispersed teams, plus specialized software for architecture management, asset management, change and release management, integrated requirements management, process and portfolio management, and quality management.
-
Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
-
Explore Rational computer-based, Web-based, and instructor-led online courses. Hone your skills and learn more about Rational tools with these courses, which range from introductory to advanced. The courses on this catalog are available for purchase through computer-based training or Web-based training. Additionally, some "Getting Started" courses are available free of charge.
-
Subscribe to the Rational Edge newsletter for articles on the concepts behind effective software development.
-
Subscribe to the IBM developerWorks newsletter, a weekly update on the best of developerWorks tutorials, articles, downloads, community activities, webcasts and events.
-
Browse the technology bookstore for books on these and other technical topics.
Get products and technologies
-
Download trial versions of IBM Rational software.
- Download these IBM product evaluation versions and get your hands on application development tools and middleware products from DB2®, Lotus®, Tivoli®, and WebSphere®.
Discuss
- Check out Rational ClearCase forum to post questions, find answers, and share solutions about configuration management and Rational ClearCase.
- Check out
developerWorks blogs and get involved in the developerWorks community.

Joydipto Banerjee graduated from National Institute of Technology in Silchar, India, with a Bachelor of Engineering in Computer Science degree. He has extensive experience with analysis, design, and development of UNIX-based applications in a ClearCase environment, both base and UCM. Joydipto is an IBM Accredited Senior IT Specialist and is working as part of IBM’s project BigGreen at Research Triangle Park, North Carolina, in the United States.
Comments (Undergoing maintenance)





