Monday, April 12, 2010

Migrating from VSS to StarTeam

Just so you know, and I'm sure you'll try also, I did Google & Bing and found some other ways of doing this.

Migrating from VSS to Starteam is not difficult. Many have done it already. However, the challenge is on migrating the history of your source code files over.
If only the tip is migrated, which is pretty easy, then, you will lose the history of changes done to the source code.

I needed to migrate source code with history. Fortunately, I was using labels in VSS to mark each production release milestones. If you did not use labels in VSS, then it is hard to create a corresponding working directory based on labels.

The approach described here assumes that you are able to create working directory of you app releases, milestones or versions in chronological order. Otherwise, you will only be able to migrate the tip of your source code or spend a ton of your time creating the history manually.
You can either use the labels or other means to create the different versions of you app into separate working folders.

First thing to do - Plan the directory structure you want within Starteam. You could choose to use the same directory structure or modify to some known and practiced pattern.

Sample Project structure:

  • build
  • Files (contains jars, wars, ear, etc and other files)
  • Script (scripts to build the jars, wars,ear, etc)
  • code (source code directory)
  • config (any configuration related data)
  • database (e.g sql scripts to create tables, indexes, etc)
  • Docs
  • lib
  • Packaging (files to build packages for disployment)
  • Testing

Pre-work
Checkout the versions of your project into a work directory.
The first working directory will be the . This is the oldest that you want to start from.

Then, do the same for the remaining versions. These are versions that you want to keep in Starteam.
Each time, use different name for the work directory e.g. ProjectA-ver1.0, ProjectA-ver1.1, etc.

: Start with the baseline version. E.g. ProjectA-ver1.0
Trim the baseline to meet your new Project directory structure you want in Starteam.
Validate that you are able to re-build the jar, war and/or ear files. Also, if you need to package for deployment, make sure you can still create a deployable package.
You will need to modify the build and package scripts since you may have moved your source code and other folders around. I modified my ANT scripts and properties files.

Once you have a , that would be the project that you will check into Starteam as first version, 1.0.

But, don’t do it yet.
Check out the next version you want to keep into a different folder,

: Do the same as you did for .
Trim .
Leverage what you have learned from trimming .
You can be as creative or innovative as you can be. I used BeyondCompare software to compare <baseline> and <baseline+1>.
End product should be <baseline+1>. At this point, there will be 2 project directories - <baseline> & <baseline+1>.

You can repeat this for as many versions of your project that you want to migrate to Starteam.

At this point, you should have 2 folders, having the same directory structure:
<baseline>
<baseline+1>

Migration To StarTeam:
Start the StarTeam client.
Navigate to project main or root view.
Either right mouse click or chose click on the ‘View/Properties’ and select the 'Alternate' as the Working Folder, and point to it to on your local PC. See working folder sample image below.




Next, click on ‘File’ and enable “All Descendents” option. This provides a summarized view of your items on the right. The next 2 figures provides some visuals to guide you.



Also, turn on “Show Not-In-View Folders”.
Since this is your first checkin, you would probably see the files status grouped as “Not in view”.
“Not in view” - The file is in your working folder, but not in the project view. Hence, you can add this files into the Starteam.
Right mouse click on the status, and select “Add Files” option from the dropdown. Files will be added to StarTeam. At this point, the client should auto refresh or you can manually do that. Click on “Window/Refresh” or press Shift+F5 keys.
Now you have the synchronized with Starteam.

Chose the project main or root view. Select “View\Labels “ and add a View Label. This will create a view label and attaches the current tip of all your items in the project. Keep the default, which will be timestamp based.

Now to work on the <baseline+1> from the directories on your local PC:

Migration To StarTeam:
Assuming you still have the client up. Otherwise, restart and open your project.

Navigate to project main or root view.
Either right mouse click or chose click on the ‘View/Properties’ and select the Working Folder to point to default and select the folder using the browse button.
Click on ‘File’ and enable “All Descendents” option. This provides a summarized view of your items on the right.

Navigate to project main or root view.
Either right mouse click or click on the ‘View/Properties’ and select the Working Folder to point to .
Click on ‘File’ and enable “All Descendents” option if you need to. This provides a summarized view of your items on the right. Also, turn on “Show Not-In-View Folders”.

Since this is , you can have the following status:

  1. Current:The tip revision of this file is in your working folder.
  2. Merge:The file in your working folder has been modified, but is not based on the tip (latest) revision of this file
  3. Modified:Your working file has been altered and is based on the tip revision of this file.
  4. Unknown:The file in the working folder has the same name as a file in the view, but the file in the view has not been checked out from the repository. You may have copied it from another location.
  5. Out of Date:The file in your working folder is an outdated revision of the file
    Not in view:The file is in your working folder, but not in the project view
  6. Missing:The file is not in your working

I have the table below that can help you decide what you can do with each.
For the “Current” and “Missing” statues, you need not perform any acttion against it. Chances are you will have lots of files under “Unknown” or “Not in View”.

After taking each action against a particular set of files, click on “Window/Refresh” or Shif+F5 to refresh your listing. This will re-synchronize the file status with StarTeam.

“Unknown” status files:
Right mouse click and select “Update Status” option. StarTeam compares your working file and the tip revision in Starteam for you.
A result of “Update Status” might be that you have more files that are “Current” and some new ones under “Out of Date”, etc.
Those files that still remain as “Unknown” requires you to compare contents manually and if needed, force a CheckIn. There is a option in the CheckIn dialogue pop-up box to check a Forced Checkin.

The same be be required for “Out of Date” and “Modified”.. At this point, it’s Source code management 101 - compare and decide what is required.

At the end of this activity, you will/should have only the following statuses:

  • “Current”
  • “Missing”

Now, Label your project items, as you did for . This will be your version 2.
Note that some of the files may not have changed since . By attaching this to the label, these files will have 2 labels.
You may want to consider adding comments during each CheckIn or Add that helps you understand the history.
I added comments such as - gsohub2.0 fileset, gsohub2.1 fileset, etc

Now you have some history for your source code in Starteam. As I mentioned at the beginning, I did Google and found some other ways of doing this.

Hope this is helpful in your migration to StarTeam.

Click on the image and it'll expand to actual size.



Friday, February 26, 2010


I came across this article in CIO Insight - 20 IT Skills on the Rise. See the figure at the bottom.

Interesting to note that SAP skills are on the rise. My thoughts on that is, may be the economy is starting to pickup. Business is starting to plan and invest in growth - spending more money to add capabilities and new functionalities.

SAP being an enterprise solution, could be used to measure (correctly or incorrectly), what the business mindset is towards spending more money to grow. HP's first quarter result seems to support the renewed business interest to spend more.

I also noticed Solaris skillset in the 6th position. Hmmm.... makes you wonder if this is a temporary spike to move off Solaris and onto Linux. Now that Oracle has bought Sun and all. However, I don't see any Linux related skills in the list.



I was also expecting some hard core development skillset to be on the list e.g. Spring Framework, RIA, .Net, etc.., but they are missing.

We can't take this as an absolute data on the trend, without knowing how this metrics were collected. But it is something to chew on amongst all the others - not that we are lacking on things to chew on.