views:

633

answers:

2

My client is migrating from Source Safe to Clearcase. They need to list all the link files in the Source Safe database so the links can be carried over to Clearcase, as apparently all the source must be checked into Clearcase on day 1, losing any existing links.

Are there any tools for creating this report, or perhaps even doing the full import into clearcase ?

My plan is to write a powershell script to recurse Source Safe the SS folders, findings links using COM.

Thanks.

+2  A: 

As I have mentioned in this question, clearexport_ssafe should be used for import from Source Safe to ClearCase.

However, the documentation for that tool explicitly mentions:

Shares. There is no feature in Rational ClearCase equivalent to a Visual SourceSafe share. clearexport_ssafe does not preserve shares as hard links during conversion. Instead, shares become separate elements

So your script would need to list all links, and create soft links between their initial directory and the newly created separate element.

But I believe you may want to consider another organization for the target ClearCase repository, one in which all share files are no longer directly used, as illustrated by this answer (for SVN repository in this instance):

We have eliminated all of our linked files. All class files that were previously linked have been placed into class libraries which are shared to our other projects as shared project references in the solution. So in essence you share libraries, not class files.

There was a bit of an adjustment process getting used to this, but I haven't missed links since then. It really does promote a better design practice by having your code setup like this.

I work mainly with UCM, and all those "share" are natural candidate for UCM component, with UCM baselines to refer to their different version, and you can then make your own "configuration" (list of labels) in order to select the different components you need, making them easily reusable across projects.

VonC
Thanks VonC, some good advice and tips.The CM guy says he killed the clearexport_ssafe after 3 days. The sourcesafe database has been around for several years, so currently he is going for the checkin files option and lose history, but still maintain a locked SS for old history.I agree on the linked source files, but in our case the files are configuration or testdata files. They are linked as they are used not only by individual BizTalk solutions, but also linked to aggregate the files into different integration/test teams folders . Hmm, I think we should look at UCM as you say!
bamboowave
+2  A: 

As VonC mentioned, the import from VSS to ClearCase is truly atrocious as:

  • The export/import takes forever to complete, so much so we open a PMR against IBM for it (that didn't help, btw)
  • The Source Safe shares are transformed into files, which is creating duplicates all over the place (the horror !).

I work on ClearCase UCM myself, and we took the same decision as you (which, in my 10 years of experience in CM, is ALWAYS the best decision): leave the history behind for reference and import at most a couple of versions one on top of the others, by hand (like current in development ; current in test ; current in live).

The way we solved the shares' problem is as follow:

  1. The "shares" where isolated from the source-tree, to be imported independantly from the other sources

  2. The other sources where imported (without the history and without the shares) from scratch. Let say in a component called MAIN_SRC

  3. The shares where imported (without the history) from scratch. Let say in a component called SHARE_SRC

  4. A project was created containing both components: MAIN___SRC, and SHARE_SRC.

Now, the problem is not solved because your shares are living aside your main source code, when your IDE (e.g. Visual Studio) fully expects them to be in the same folders they were before (i.e. in Visual all your projects become wrong if you don't solve this issue, and all the files would need to be relinked from within Visual itself, etc... A lot of work).

This is resolved by using ClearCase VOB symbolic links:

Let says in MAIN___SRC you need to use a file called myShared file in SHARE_SRC.

From within the folder needing to use the myShared file, use the command line interface and run:

cleartool ln -s ..\..\SHARE_SRC\(myPath)\mySharedFile .

You need as many ..\.. as necessary to go up to the component folder level in ClearCase, and then down following your path (myPath) in the SHARE_SRC component folder.

Remember the ClearCase path is composed of:

M:\View_name\VOB_name\Component_name\Your first level of files and folders

( VOB_name\Component_name is the "root" of the component, apart if you have single component VOB, in this case VOB_name\Component_name becomes just VOB_name)

The easiest way is to have a mapping of all the VOB symbolic links that need to be created, and put all necessary "cleartool ln -s" command lines in a script to run once.

After that, you should be fine, and your IDE think the sources are where they used to be.

Cheers,

Thomas

Thomas Corriol
Thanks Thomas, the symbolic linking looks good. I've knocked up a Powershell script to find all the links. Once I get a chance to try it, I will post it here for others to share.Thanks all.
bamboowave
An... Another Configuration Manager! Actually using ClearCase!! With UCM!!! I am not alone!? ;) Nice answer, by the way, even if I am not too fond of symbolic link in case of shares. I prefer keeping share paths separate from development path.
VonC
Hi VonC, yes I am a Configuration Manager by trade. :) I currently use ClearCase UCM but I cannot say it's my favourite. I have used Teamware from Sun (way back, it was very basic), StarTeam from Starbase/Borland, Continnus/Telelogic Synergy (my favourite so far, unfortunately, they have been bought by IBM and will probably be killed off :( ), and Rational/IBM ClearCase UCM. I actually don't think the tool matters that much to be a CM expert. A broad development "culture" and a good understanding of the teams' processes and how they integrate with CM is more important for me.
Thomas Corriol
@Thomas: I agree on the "culture" side and teams' processes :). See http://stackoverflow.com/questions/645008/what-are-the-basic-clearcase-concepts-every-developer-should-know/645771#645771 as an example (and also Jonathan Leffler in the same thread below)
VonC