During the import stage, you invoke clearimport within an existing VOB on the datafile created by clearexport_*. For each object processed by clearexport_* and entered in datafile, clearimport does one of the following things:
The user who invokes clearimport becomes the owner of the elements that clearimport creates. clearexport_* and clearimport use magic files to determine which element type to use for each element clearimport creates. For more information about magic files and file-typing, see the cc.magic reference page.
If any of the original files were located in subdirectories, clearimport creates corresponding directory elements.
To select the directory version into which it imports elements, clearimport uses your view (UNIX and Linux) or your view context (Windows). However, when clearimport creates directory versions, it creates them on the main branch. The exceptions are as follows:
When importing into a snapshot view, you can improve performance significantly by specifying –noload option.
clearimport documents changes to the VOB by creating event records:
clearimport can skip certain versions or entire elements, which gives you some flexibility:
By default, clearimport converts all file names to lowercase. This is generally the simplest and most efficient way to import files when you use the MVFS option of case-insensitive mode (the default). Converting file names on import mirrors the behavior of new files created in case-insensitive mode. For more information, see the IBM Rational ClearCase Administrator's Guide.
Use the –pcase option when you need to preserve the case of files being imported; for example, when you import files whose names differ only in case (for example, Makefile and makefile), and you have disabled case-insensitive mode.
clearimport prints an error when it cannot read an element version specified in the export data file. It creates version 0 of the unreadable element and continues to process the export datafile. Additionally, if clearimport has any difficulty importing any elements, it prints a list of such elements after it finishes.
Specifying this option can improve clearimport performance substantially. If you also specify the –identical option, clearimport does not compare element versions to determine whether they are identical. Used with –noload, -identical can further improve clearimport performance.
The UNIX system and Linux examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.
The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.
In cleartool single-command mode, cmd-context represents the UNIX system and Linux shells or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.
% cleartool setview newview (set a view)
% cd /vobs/newvob/import (go to VOB directory where data is to be imported)
% clearimport -identical -c "rick's import" ../../../src/cvt_data
(invoke clearimport)
c:\> net use y: \\view\view1
Drive Y: is now connected to \\view\view1.
The command completed successfully.c:\> y:
y:\> clearimport -verbose -directory \newvob cvt_data