In memory of Popo: A couple of tips importing ClearCase to RTC

We’ve always had pets since I was very young: dogs, cats, cows, goats, rabbits, a fox that escaped and wiped out the rabbits; even a “Bambi” that disappeared, though we had some fantastic chilli venison a couple of nights later. “Popo” was one of a long line of dogs we’ve had; a mostly unremarkable Pomeranian; memorable for the fact that the day he was given to us, he was so terrified of his new surroundings and all us kids squealing over him that he jumped up on mum’s lap and did “his business” on her:-)

Now fast forward maybe 12 years and I’d just started work as a Software Engineer and one of the tools we had to use was ClearCase. Most of what we learned was on the job; which was interesting especially as we almost exclusively used the command line. We had pretty powerful Solaris workstations but using the X versions of the ClearCase tools was considered “woosie“. Anyway, I became intimately familiar with “cleartool” or its much-loved alias “ct“. There were many, many sub-commands to cleartool and though there was some method to the madness, it was impossible to remember all the options each command took. Fortunately, every command prints a usage message if you got one of the options wrong. My favourite all-encompassing option was “-popo”. No, it isn’t a real option to any ClearCase command I know of, which was exactly my intention: “-popo” would always print out the usage message. Yes there are easier ways and other ways but for some reason Popo had stayed in my memory and this was my vague way of immortalizing him in my mind at least.

Fast forward again another 12 odd years to the present: I haven’t done any “hard core” ClearCase work for maybe 3 years, except for writing Importing ClearCase/ClearQuest Unified Change Management into Rational Team Concert 3.x , and a couple of engagements helping customers move from ClearCase to RTC. Over the last couple of weeks I’ve been helping a customer move their stuff from ClearCase to RTC and one of the issues they were having was around how to get RTC to not change the CR/LF characters from some of their files. The Synchroniser Wizard let’s you specify whether the files in the VOB use Unix or Windows linefeeds and the properties of the synch stream can also be changed to specify how RTC handles these linefeeds. Being the type that always has to see something work rather than pointing folks to documentation, I setup a virtual machine with ClearCase, an RTC server and the ClearCase Synchroniser. I used to pooh-pooh (in the politest possible way of course:-) anyone’s suggestion that ClearCase was a nightmare to setup. I still would: excluding the media download time, it took me no more than a couple of hours to install, setup user accounts, create a few VOBs, views and import some sample source. Setting up the RTC bits took another couple of hours.

I’d just completed a couple of quick tests on the line termination behaviour on import when the customer pointed out that their ClearCase environment was on Linux and all the stuff I’d done was on Windows. I didn’t think that it made a difference to the import but to be certain I created a Linux VM with all the bits I needed on it. This *was* a bit more challenging but mostly because I needed to make sure I had the right libraries installed. Of course my VM was 64-bit so I need to get the 32-bit versions in place as well. Once that was done, the rest of the ClearCase/RTC setup took not much longer than when I’d done it on Windows.
On Windows I’d just used all the ClearCase GUI tools. On Linux I went to the command line and to my horror found that “ct” didn’t work! At least it didn’t give me a “Bad phone number” error. Once I got the alias setup I was in business and Popo lived again. Then the memories came flooding back, I guess 15 odd years means you don’t really forget. So I was happily  “ct ci”ing “ct ls”ing and “ct co “ing away. And Popo was always at my shoulder, if I ever got stuck.

Nostalgia aside, a couple of things about using the ClearCase Synchroniser I learned from this exercise I thought worth sharing.
1. Going through the “ClearCase Synchronized Stream wizard” it kept failing when trying to create the synch view. The error was a strange one particularly in the reference to CCLT :


I had of course successfully tried all “normal” ClearCase operations including view creation outside of the Sychroniser so I tried a couple of times with the same result. Reading the error message carefully I noticed that it was trying to create the view storage at “/net/…” and realized that I hadn’t exported the view storage file system via NFS. I pinged, Masa (RTC Development Lead for the RTC CC/CQ Synch Connectors) and while waiting for a response, setup NFS, exported the view storage, and of course the wizard worked fine. It turns out from Masa’s response that the wizard internally calls “cleartool mkview”, but it does not use storage locations that may have been defined. So if the view storage wasn’t exported then I needed to specify the appropriate values for the host name, host-local path, and global storage path of the Rational ClearCase server storage location in the Wizard.
There are actually 2 lessons in this first point: a) if the storage locations are not exported (fairly unlikely in a production environment; but probable when using a test environment), use the options on the wizard. b) READ the MANUAL properly: the Infocentre page at actually points out what Masa told me.

2. Setting *both* the LINE_DELIMITER and LINE_DELIMITER_WORKSPACE properties  to UNSPECIFED will not do any line termination character conversion on import. This turns out to be undocumented but really useful (again thanks Masa!) as it is when you have scripts that contain ^M characters as part of the actual script, rather than as line terminators, which need to be brought in as-is. If any of the other documented values for these properties are specified (PLATFORM, LF ,CRLF) then the ^M gets converted as appropriate and the script won’t work as expected.

RIP Popo.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s