DOpus with Rational Clearcase

Is there anything special that needs to be done to get DOpus to work with Rational Clearcase? I'm currently evaluating it to use at work but if Clearcase doesn't work with it I won't be able to use it.

Thanks,

John

You shouldn't need to do anything special since ClearCase views are mounted as real filesystems.

Except ours runs a perl script on checkout and it appears DO isn't starting the perl script in the current directory I am in. Instead it starts in in my desktop folder. Is there a way to change this default behavior as these scripts run fine in Windows Explorer and several other directory navigator programs like DO so its got to be a DO thing.

Thanks.

John

How is the Perl script run? From a context menu or something else?

Yes, context menu.

Edit: See post after this one as well as I missed an important detail the first time.

Do you know what kind of context menu handler we are talking about?
[ul][li]DLL-based Context Menu Handlers:

As far as I can tell, Explorer doesn't set the current directory for shell extensions either.

The screenshot below is from running a test shell extension on a file in my Documents folder, via Explorer. (I tried a bunch of other folders as well, including simple things like C:) As you can see, the current directory doesn't correspond to where the file is.

The CD in Explorer seems to move around sometimes. I can't work out the exact pattern but it doesn't look like it's tied to the visible folder or anything that should be relied upon. The CD in Opus seems to be fixed as the folder that it was launched from.

Could it be that the Perl script doesn't need the CD to be set to where the files are, but that it is assuming it has write access to the CD?
[/li]
[li]Command-Line Context Menu Handlers:

With simple context menu handlers which specify command-lines in the registry, instead of a shell extension DLL, both Explorer and Opus do seem to set the current directory.

For example, use the Opus file type editor to add a context menu command which runs cmd /k cd and then run it on a file and it will open a DOS window in the file's directory.
[/li]
[li]Attachment:

I've attached the test context menu handler I made if you want to experiment with it on your system. It'll add a SimpleShlExt Test Item option to all file context menus. Selecting it will display a message like the screenshot below.

You should install it using regsvr32 SimpleExt.dll and uninstall it using regsvr32 /u SimpleExt.dll

It's based on this code sample and all I did was modify CSimpleShlExt::InvokeCommand so that it calls GetCurrentDirectory and adds the result to the message.[/li][/ul]


SimpleExt.zip (42.9 KB)

I looked again and now I see there is a "Working Directory" parameter passed to DLL context menu handlers which Opus isn't setting but Explorer is. So maybe that is it.

It seems wrong for a handler to depend on this, though, as it's documented in MSDN as being optional and always being NULL (even though it isn't) for shell extensions:

[quote="MSDN"]lpDirectory
Optional working directory name. This member is always NULL for menu items inserted by a Shell extension.[/quote]

msdn.microsoft.com/en-us/library/bb773215(VS.85.aspx

In Explorer it is NULL if you're working on things like search results, too... So anything that depends on it is going to have problems sometimes. Still, maybe Opus should set it when it can, even if it does seem to contradict the documentation.

Both screenshots below come from Explorer, with the NULL directory one being from a search result. (FWIW, this time the current directory happened to be the file's directory as well, I think because I had just killed and restarted Explorer from the Desktop in order to force it to load the new shell extension.)




SimpleExt2.zip (42.9 KB)

[quote="leo"]I looked again and now I see there is a "Working Directory" parameter passed to DLL context menu handlers which Opus isn't setting but Explorer is. So maybe that is it.

It seems wrong for a handler to depend on this, though, as it's documented in MSDN as being optional and always being NULL (even though it isn't) for shell extensions:

[quote="MSDN"]lpDirectory
Optional working directory name. This member is always NULL for menu items inserted by a Shell extension.[/quote]

msdn.microsoft.com/en-us/library/bb773215(VS.85.aspx

In Explorer it is NULL if you're working on things like search results, too... So anything that depends on it is going to have problems sometimes. Still, maybe Opus should set it when it can, even if it does seem to contradict the documentation.

Both screenshots below come from Explorer, with the NULL directory one being from a search result. (FWIW, this time the current directory happened to be the file's directory as well, I think because I had just killed and restarted Explorer from the Desktop in order to force it to load the new shell extension.)[/quote]

That must be the problem. Unfortunately our Configuration Management department just says "it works in explorer so use that" (by the way, they don't support check files out of a search window either so that must be the issue). If DO fixes this I'll be able to recommend DO as a department standard tool. Until then I'll just use it for everything but our custom checkout commands.

Thanks for the help.

Makes sense. I've reported this to GPSoftware and it's probably easy to fix, so hopefully it'll be included in the next update.

Great. Is there an issue number or something I can track it by so I can tell if / when its been fixed?

It's being worked on now and should be included in the next update, all going well. If I hear anything I'll mention it here.

Hi Jarmenia,

I got word that this change has been made in the code and will be part of the next update.

I'm going to try to get you a pre-release version of the update (probably on Monday and missing a few unrelated changes) so that you can test it with your CC/Perl setup, in case there's more to it than we thought. That way we can ensure the real update solves things and you don't have to wait for another update after that.

What's the best way to send you the details of the test version? PM on the forums or your forum email address, or another address? Let me know and I'll be in touch.

Leo

The "current directory" context menu change has been released as part of Opus 9.1.1.0; hopefully it solves the problem you were seeing with the Perl scripts.