Frequently
Asked Questions about
StarTeam

Process to migrate CVS archives to StarTeam archives using the Command Line processing

StarTeamSend this document to a colleague

Overview

This is an outline of a process to migrate CVS archives to a StarTeam archive format. This process requires that the user know how to use the CVS command line function. The user will also need to know a little about StarTeam GUI and the StarTeam command line. This document assumes that the CVS archive and program is running in a Unix environment.

Requirements:

  1. StarTeam server installed and running.

  2. Installation of Java SDK 1.1.6 or greater on Unix computer.

  3. Installation of the StarTeam Universal Command Line client on Unix computer.

  4. Installation of the StarTeam GUI.

Creating StarTeam Project from CVS migration:

From the StarTeam GUI you will need to create a StarTeam project for the CVS project. When you create the StarTeam project you will create a folder tree that matches the CVS project tree (see fig. 1.1 below). StarTeam project tree will create directory and sub-directory by the folder name in the project tree. StarTeam will check-in and check-out files using this project tree structure:

StarTeam

Setup of the Universal Command Line Client for StarTeam:

To install the Universal Command Line you are required to install the Sun Java SDK 1.1.6 or better for the version of Unix. The Universal command line installation program will require that the user use an X-terminal window to execute. The installation will create a batch file name STCMD.

Script to migrate CVS to StarTeam:

The instruction below is a guideline to create a script the will migrate CVS projects to StarTeam projects.

Adding first to the StarTeam project section of the script:

  1. The first line of the script should be a CVS command to check-out the first revision of the project.

  2. The second line in the script should be StarTeam STCMD command that will add the files to the pre-built StarTeam project. (i.e: stcmd add ?p ?UserName:Password@computernameIP:endpoint/ProjectName/ProjectView? /is /u /q /x /d ?Init Check-in? /vl ?Build 1? /rp ?\Unix file path? /eol on *.) 
    Note: This will add the file to the StarTeam project. Please reference Chapter 17 in the StarTeam User Manual or the Online User Manual install with the StarTeam client for definition of command line switches.

Below is the section of the Unix script that must loop to complete the check-in of all revisions in the project:

  1. Have the script remove any files from the Unix directory after the files have been add to StarTeam.

  2. Script the CVS command line to check-out the next revision of the project. (i.e.: CVS command line check-out revision 2 then 3 then 4 then 5.)

  3. Script the StarTeam command line to check-in the files with a label. (i.e: stcmd co ?p ?UserName:Password@computernameIP:endpoint/ProjectName/ProjectView? /is /q /x /o /r ?Reason for check-in? /vl ?%variable%? /rp ?\Unix file path? /eol on *.)
    Note: %Variable% is used to change the label from each revision being added to StarTeam. You may create a file that will pass the labels to the script. Please reference Chapter 17 in the StarTeam User Manual or the Online User Manual install with the StarTeam client for definition of command line switchs.

  4. You should script a loop command to repeat steps 1 to 3 until step 2 in the process can not check-out any more file revisions.