clearexport_ffile

Converts flat files to versions of ClearCase elements

APPLICABILITY

ClearCase (administrative command)

SYNOPSIS

clearexport_ffile [ -r ] [ -o datafile-pname] [ -s date-time ]

[ -b target-branch [ -v version-id ] ] [ -t temp-dir-pname ]
[ source-name ... ]

DESCRIPTION

The clearexport_ffile command processes flat files so that they can be imported into ClearCase elements and/or used to update existing elements. The source data can range from a single file to an entire directory tree.

Export Stage

During the export stage, you invoke clearexport_ffile in the area where the original flat files reside. clearexport_ffile creates a datafile (by default, named cvt_data), which contains descriptions of files and directories. The source-name must be a file or directory in your current working directory, or the current working directory itself.

By default, clearexport_ffile processes every file in the current working directory, including invisible files ( file names that begin with a dot; for example, .login). Be sure to delete superfluous files and directories, such as text-editor backup files, before entering this command.

Import Stage

In the import stage, you invoke clearimport on the datafile to import information into the new VOB. If any of the files to be imported reside in subdirectories below the current working directory, clearimport creates corresponding directory elements.

clearexport_ffile and clearimport use ClearCase magic files to determine which element type to use for each element clearimport creates. For more information on magic files and file typing, see the cc.magic reference page.

NOTE: You cannot run clearexport_ffile on UNIX and then run clearimport on Windows to import the data, or vice-versa. However, you can transfer data in either direction between UNIX and Windows by mounting the UNIX VOB or file-system on your Windows machine and running both clearexport_ffile and clearimport on the Windows machine.

HANDLING OF OBJECTS THAT CANNOT BE EXPORTED

When clearexport_ffile encounters a file or directory that cannot be exported (for example, a file with format problems, or a broken symbolic link), it prints an error and continues. After creating the data file, the command prints a summary of the files and directories that could not be exported.

PERMISSIONS AND LOCKS

Permissions Checking: No special permissions required. Locks: No locks apply.

OPTIONS AND ARGUMENTS

HANDLING OF DIRECTORY ARGUMENTS.   Default: If you specify a directory as a source-name argument: (1) clearexport_ffile processes the files in that directory but ignores the contents of the subdirectories; (2) clearimport creates a directory element for source-name and for each of its subdirectories.

-r

clearexport_ffile descends recursively into all source-name arguments that are directories.

STORAGE LOCATION OF DATAFILE.  Default: clearexport_ffile creates datafile cvt_data in the current working directory.

-o datafile-pname

Stores the datafile in the specified location. An error occurs if datafile already exists.

SELECTIVE CONVERSION OF FILES.  Default: clearexport_ffile converts all files it encounters.

-s date-time

clearexport_ffile processes only files modified since the specified moment. Specify the time in one of the following formats:date.time | date | time | now
where:

date

:=

day-of-week | long-date

time

:=

h[h]:m[m][:s[s]] [UTC [ [ + | - ]h[h][:m[m] ] ] ]

day-of-week

:=

today |yesterday |Sunday | ... |Saturday |Sun | ... |Sat

long-date

:=

d[d]-month[-[yy]yy]

month

:=

January |... |December |Jan |... |Dec

Specify time in 24-hour format, relative to the local time zone. If you omit the time, the default value is 00:00:00. If you omit date, the default is today. If you omit the century, year, or a specific date, the most recent one is used. Specify UTC if you want ClearCase to resolve the time to the same moment in time regardless of time zone. Use the plus (+) or minus (-) operator to specify a positive or negative offset to the UTC time. If you specify UTC without hour or minute offsets, Greenwich Mean Time (GMT) is used. (Dates before January 1, 1970 Universal Coordinated Time (UTC) are invalid.)

CREATING NEW VERSIONS ON A BRANCH.  Default: clearimport creates new versions of a file or directory element on the element's main branch.

-b target-branch [ -v version-id ]

Converts each file to a version on branch target-branch of the new or existing element. Whenever clearimport creates a new element in the target VOB, it also revises the parent directory element on branch target-branch. To prevent directory branching, you can check out all directories on any branch before importing. clearimport then uses the checked-out directories.
If branch type target-branch does not already exist in the target VOB, clearimport creates it. If an existing element already has a branch of this type, the new version extends this branch; otherwise, clearimport sprouts target-branch from version \main\LATEST (\main\0 for new elements). To specify another version from which to sprout the branch, use the -v option.
For example, if you use clearexport_ffile -b bugfix and bugfix does not already exist, clearimport creates new versions on the bugfix branch and sprouts it from the latest version on branch main:

If you use clearexport_ffile -b bugfix -v \main\v1.0\FCS_VER and bugfix does not already exist, clearimport creates new versions on the bugfix branch and sprouts it from the version on the \main\v1.0 branch labeled FCS_VER:

DIRECTORY FOR TEMPORARY FILES. Default: clearexport_ffile uses the value of the TMP environment variable as the directory for temporary files.

-t temp-dir-pname

Specifies an alternate directory for temporary files. This directory must already exist.

SPECIFYING FILES TO BE EXPORTED.  Default: clearexport_ffile processes the current working directory (equivalent to specifying "." as the source-name argument). clearexport_ffile processes each file in the current working directory. clearimport creates a directory element for each subdirectory of the current working directory.

source-name ...

One or more pathnames, specifying flat files and/or directories:

  • For each specified file, clearexport_ffile creates an entry in the datafile with a command to import it as a ClearCase version.
  • For each specified directory, clearexport_ffile creates entries for all the files it contains. clearimport creates a directory element with one version for the specified directory itself, and for its subdirectories.
Each source-name must be a simple file or directory name. This enables clearimport to reliably access the source data. Specifying the parent directory (..) causes an error, as does any pathname that includes a backslash (\). Thus, before entering this command, change to the directory where (or under which) the flat files to be exported reside. To process all the files in a single directory, change either to that directory or to its immediate parent.

EXAMPLES

cd \scratch (go to parent of standard directory tree to be converted)
clearexport_ffile -r exper (create the datafile)
VOB directory element ".".
VOB directory element "exper".
Exporting element "exper\ar.c" ...
Extracting element history ...
Completed.
Exporting element ...
Creating element ...
...
Exporting element ...
Creating element ...
Element "exper\util.c" completed.
Creating datafile cvt_data ...
cd \dev
clearexport_ffile -r -b bugfix
cd \dev
clearexport_ffile -r -b bugfix -v \main\v1.0\FCS_VER

SEE ALSO

clearexport_*, clearimport, events_ccase, relocate



Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved.