7.7 Populating a VOB with Data

The new VOB is now ready to be populated with data. At this point, the VOB contains one directory element, the VOB root directory. (It also contains a lost+found directory. See the mkvob reference page for a discussion of this directory.) ClearCase LT includes several utilities for exporting data from other configuration management systems, as well as an Import Wizard that automates the process of moving legacy data into a VOB when the ClearCase LT server is set up. The Import Wizard is designed to be used just once as part of server setup. This section presents examples of how the other data import utilities can be used.

Importing Data into a UCM Project

You cannot run any of the clearimport procedures described in this section in a UCM view. To import data into a UCM project, you must first import the data in a non-UCM view, and then follow the procedures for setting up a project described in Managing Software Projects.

Example: Importing RCS Data

A simple conversion scenario illustrates the migration of RCS sources to ClearCase. In this example, we use an entire UNIX RCS source tree to populate a newly created VOB. The root of the RCS tree is /usr/libpub on a host where the empty VOB has already been activated, at /proj/libpub.

Creating the Data File
  1. Go to the source data. Change to the root directory of the existing RCS source tree:

  2. cd /usr/libpub

  3. Run the export utility. Use clearexport_rcs to create the data file and place descriptions of RCS files (,v files) in it:

  4. clearexport_rcs
    Exporting element "./Makefile,v" ...
    Extracting element history ...
    .
    Completed.
    Exporting element ...
    Creating element ...
    Element "./Makefile" completed.
    .
    .
    Element "./lineseq.c" completed.
    Creating datafile ./cvt_data ...

    The data file, cvt_data, is created in the current directory.

Running clearimport
  1. Use any view. clearimport ignores the config spec.

  2. Go to the target VOB. Change to the root directory of the newly created libpub VOB-that is, the directory specified by its VOB-tag:

  3. cd /libpub

  4. Run clearimport. Run clearimport on the data file, cvt_data, to populate the libpub VOB:

  5. clearimport /usr/libpub/cvt_data
    Converting files from /usr/libpub to .
    Created element "././Makefile" (type "text_file").
    Changed protection on "././Makefile".

    Making version of ././Makefile

    Checked out "././Makefile" from version "/main/0".
    Comment for all listed objects:
    Checked in "././Makefile" version "/main/1".
    .
    .

    There is no need to check out or check in the VOB's root directory element; this is handled automatically. If problems cause clearimport to terminate prematurely, you can fix the problems and run clearimport again.

Example: Importing PVCS Data

A simple conversion scenario illustrates the migration of PVCS sources to ClearCase. In this example, entire Windows PVCS source tree is used to populate a newly created VOB. The PVCS tree is located at c:\libpub, on a host where the empty VOB has been activated, at \vob_libpub.

Creating the Data File
  1. Go to the source data. Change to the directory of the existing PVCS source tree:

  2. c:\> cd libpub

  3. Run the export utility. Use clearexport_pvcs to create the data file and place descriptions of PVCS files in it:

  4. c:\libpub> clearexport_pvcs
    Exporting element ".\makefile" ...
    Extracting element history ...
    .
    Completed.
    Exporting element ...
    Creating element ...
    Element ".\makefile" completed.
    .
    .
    Element ".\lineseq.c" completed.
    Creating datafile .\cvt_data ...

    The data file, cvt_data, is created in the current directory.

Running the Conversion Scripts
  1. Use any view. clearimport ignores the config spec.

  2. NOTE: You cannot run clearimport in a UCM view.

  3. Go to the target VOB. Change to the root directory of the newly created \vob_libpub VOB-that is, to the directory specified by its VOB-tag:

  4. Run clearimport. Run clearimport on the datafile, cvt_data, to populate the \vob_libpub VOB:

  5. z:\vob_libpub> clearimport c:\libpub\cvt_data
    Converting files from c:\libpub to .
    Created element ".\.\makefile" (type "text_file").
    Changed protection on ".\.\makefile".

    Making version of .\.\makefile

    Checked out ".\.\makefile" from version "\main\0".
    Comment for all listed objects:
    Checked in ".\.\makefile" version "\main\1".
    .
    .

    There is no need to check out or check in the VOB's root directory element; this is handled automatically. If problems cause clearimport to terminate prematurely, you can fix the problems and run clearimport again.

    For more information on the ClearCase exporters and importer, see the clearexport_ccase, clearexport_pvcs, clearexport_rcs, clearexport_sccs, clearexport_ssafe, clearexport_cvs, clearimport and clearfsimport reference pages.