Last week, I was working on the ClearCase adapter for our TFS integration platform.

We use the command “clearfsimport” to import files to ClearCase. Everything worked fine until we used the “–mklabel” switch to label all versions created during the command execution.

ClearCase V7 has the new switch “-upd” that only applies label when the import actually creates a new version. I thought we need this feature. So I copied “-upd” directly from this online reference page. Then the problem occurred. We got the following error message all the time: clearfsimport: Error: Could not access "ûupd". 

I spent quite some time to investigate this problem. It turns out that the ASCII character used on web page for dash ‘-‘ is 150, and normal ASCII for ‘-‘ is 45. On windows command line, ASCII 150 is recognized as ‘û’. So windows thinks “ûupd” is an vob object and threw that exception.

The fix was easy, just type ‘-‘ over the 150 ‘-‘ and we got clean clearfsimport result.

So the lesson learned – copy paste programming just doesn’t work.