Skip to main content

Using application data with Rational ClearCase when no integration is available

How to import and export projects without ClearCase integration

Jean-Claude Staquet (jcstaquet@nl.ibm.com), Technical Support Engineer, IBM
author photo
Jean-Claude is a Rational Technical Support Engineer who has contributed to numerous IBM Technotes published on the support Web site. He previously worked as software configuration manager and system engineer.
Marek Suchecki (mareks@nl.ibm.com), Technical Support Engineer, IBM
author photo
Marek has worked for IBM Client Support for nine years (four with Lotus, then five with Rational), with many direct links to product management and engineering. He has also written and contributed to published IBM Technotes

Summary:  Some software offers IBM® Rational® ClearCase® integration (SCC or native). This article explains how to check in and check out the application data with ClearCase when no such integration exists. If the data consists of just a few files, then the checkout and check-in operations can be done manually by using the ClearCase GUI or from command line. However, when the data is stored in a complex directory structure (often called projects), it might be necessary to use clearfsimport, a tool that is included with ClearCase.

Date:  15 Oct 2009
Level:  Introductory PDF:  A4 and Letter (62KB | 6 pages)Get Adobe® Reader®
Activity:  653 views

This article will be most useful to software configuration managers and IBM® Rational® ClearCase® administrators.

Approach

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.


Solution

Prerequisite

ClearCase Version 7 full client installed

Procedures

These procedures are not supported nor fully tested. Take them merely as suggestions.

These are the main steps of the check-in (import) procedure:

  1. Prepare a temporary local and private workspace, outside of ClearCase.
  2. Create and save your application data in your workspace.
  3. Close the application to make sure that no file remains open.
  4. Use clearfsimport to import your workspace into a ClearCase view.
  5. Remove your workspace to avoid working on outdated files.

These are the main steps of the checkout (export) procedure:

  1. From the ClearCase view, check out the parent folder to prevent another user from working on the same data at the same time.
  2. Make a recursive copy of the folder content into your local workspace.
  3. Start your application, and load the application data from your local workspace (see Figure 1).

Figure 1. Load application data
The Open Project wizard
  1. When you want to save your modifications in ClearCase, follow the check-in procedure described previously.

Scripts

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
    


Resources

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

Discuss

About the authors

author photo

Jean-Claude is a Rational Technical Support Engineer who has contributed to numerous IBM Technotes published on the support Web site. He previously worked as software configuration manager and system engineer.

author photo

Marek has worked for IBM Client Support for nine years (four with Lotus, then five with Rational), with many direct links to product management and engineering. He has also written and contributed to published IBM Technotes

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=434985
ArticleTitle=Using application data with Rational ClearCase when no integration is available
publish-date=10152009
author1-email=jcstaquet@nl.ibm.com
author1-email-cc=
author2-email=mareks@nl.ibm.com
author2-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Rate a product. Write a review.

Special offers