This article will be most useful to software configuration managers and IBM® Rational® ClearCase® administrators.
The idea is to work in a workspace outside of ClearCase, rather than working directly in a ClearCase view. That way, you can take advantage of the flexibility offered by clearfsimport, a tool that is included with ClearCase. Clearfsimport imports a directory tree into a ClearCase Versioned Object Base (VOB) through either a snapshot or dynamic view.
The first time, it creates new elements (adding to source control). On subsequent passes, it creates new versions and is “smart enough” to reflect subtle changes in ClearCase, such as renaming, removal, and so forth.
ClearCase Version 7 full client installed
These procedures are not supported nor fully tested. Take them merely as suggestions.
These are the main steps of the check-in (import) procedure:
- Prepare a temporary local and private workspace, outside of ClearCase.
- Create and save your application data in your workspace.
- Close the application to make sure that no file remains open.
- Use
clearfsimportto import your workspace into a ClearCase view. - Remove your workspace to avoid working on outdated files.
These are the main steps of the checkout (export) procedure:
- From the ClearCase view, check out the parent folder to prevent another user from working on the same data at the same time.
- Make a recursive copy of the folder content into your local workspace.
- Start your application, and load the application data from your local workspace (see Figure 1).
Figure 1. Load application data
- When you want to save your modifications in ClearCase, follow the check-in procedure described previously.
Two sample scripts follow for implementing these procedures on a Microsoft® Windows® system for IBM® Rational® Manual Tester: ci_wspace.cmd and co_wspace.cmd, These scripts are very basic, but they can be adapted or enhanced by an administrator according to the needs and the environment.
ci_wspace.cmd
@echo off
@if A%1==A goto usage
@if A%2==A goto usage
clearfsimport -r -rmname %1 %2
if errorlevel 1 goto end
@echo.
@echo %2 is updated
cleartool ls %2
@echo.
@echo Removing
rd /s %1
goto end
:usage
@echo USAGE:
@echo %~n0 'source' 'dest'
@echo.
@echo 'source' is the pathname to the workspace on the local disk
@echo 'dest' is the pathname to the workspace's parent folder in the view
@echo.
@echo Example:
@echo %~n0 c:\RMT\workspace01 m:\rmt_view\rmt_vob
@echo.
:end
|
co_wspace.cmd
@echo off
@if A%1==A goto usage
@if A%2==A goto usage
cleartool co -nc %1
if errorlevel 1 goto end
xcopy %1 %2 /EIQ
if errorlevel 1 goto end
@echo %2 is ready
goto end
:usage
@echo USAGE:
@echo %~n0 'source' 'dest'
@echo.
@echo 'source' is the pathname to the workspace in the view
@echo 'dest' is the pathname to the workspace on the local disk
@echo.
@echo Example:
@echo %~n0 m:\rmt_view\rmt_vob\workspace01 c:\RMT\workspace01
@echo.
:end
|
Learn
-
TOC: Third-party integrations with ClearCase, a table of contents that consolidates and organizes the information concerning some of the miscellaneous supported third-party integrations with IBM Rational ClearCase products.
-
Learn more about ClearCase: For technical information and other resources for developers, see the Rational ClearCase product page or visit the Rational ClearCase area on developerWorks for articles and tutorials.
-
Find answers to terminology questions in the ClearCase Glossary.
-
Explore the Software Configuration Management Information Center to learn how features such as local and remote access, a proven use model, a wide range of supported environments, transparent access to files, and parallel development support give your team members instant, controlled access to the project assets that they need to create, update, build, reuse, and maintain your software.
-
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. You can find product manuals, installation guides, and other documentation in the IBM Rational Online Documentation Center.
-
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.
Comments (Undergoing maintenance)







