Thanks Garret,
Couldn't either your cleartool.exe wrapping code or the ClearToolTask be adapted into a base class from which specific ClearCase task could be derived ? ie .


clearcase-update
clearcase-commit
etc

I'm in agreement that having the user specify the full command isn't much improvement ( if any ) over using exec.

I'd prefer not to add two clear case tasks that use different methods to talk to clearcase - exe wrapping vs interop. one or the other would be prefereable.

Ian
Garrett Smith wrote:

Hi Ian:

I looked at the code; my comments are below. I wasn't able to run and test the code because my ClearCase trial license has expired.

This implementation is fairly similar to <exec>, in that it allows any generic command to be run, but because it is so generic does not offer fine-grained control.

Positives:
* allows you to run any cleartool command.
* doesn't require you to know where cleartool.exe (but, by default, the ClearCase installation puts cleartool in your path. So an <exec> with just cleartool.exe as the executable would work.)
* uses interop, which probably gives it a performance boost.


Negatives:
* as best I can tell, the pass/fail logic of this is that if a COMException is thrown in Execute(), the task fails. If not, it passes. This is fairly crude. I'm not sure about this, though, because I couldn't test the code.
* requires you to dig through the docs to find the correct commandline syntax. More specific tasks, like my clearcase-update and vssget, have specific attributes for each piece of information. For example, specifying <vssget user="john" password="foo" ... /> is easier and more elegant than knowing Visual SourceSafe's command line: ss.exe get ... -Yjohn,foo ...


I suggest including this task after testing to see how the pass/fail logic works. You may also ask the author.

I also would include mine. For a ClearCase update, I'd use my task. For any others, I'd use ClearToolTask.

Best,
Garrett Smith








Ian MacLean <[EMAIL PROTECTED]> 05/17/2004 10:06 PM

To: Garrett Smith <[EMAIL PROTECTED]>
cc: Subject: Re: [NAntC-Dev] ClearCase support submitted



Hi Garret,
Heres the other clearcase task. It uses the clearcase com api rather than wrapping the exe. Whats your feeling on that ? Is the com library likely to change prequently between versions thereby breaking any task based on it ?


Ian

Garrett Smith wrote:



Ian:

It's good news you got two submissions. I'll take a look at it and provide comments.

Would you mind e-mailing me the source? I didn't get the attachment via my digests from the list.

My intuition would be the code that uses the interop dll would be better.




Although "any valid cleartool command" would imply that you'd just pass arguments in via the nant script. If that's the case, how does the other




code differ from just using an <exec> on cleartool.exe?

Best,
Garrett





Ian MacLean <[EMAIL PROTECTED]>
05/14/2004 11:18 PM

      To:     Garrett Smith <[EMAIL PROTECTED]>
      cc:     [EMAIL PROTECTED]
      Subject:        Re: [NAntC-Dev] ClearCase support submitted


Thanks Garret,
We've also just received another clear case task - on the same day- one that uses the automation library and can run any clearcase command. See my recent post where I forwarded the code to the list. I don't run clear case but add the moment I'd lean towards adding the automation based version. Would you mind looking at the alternative implementation and let me know if it is feature compatible with your s ?


As a heads up - when developing a nant task that wraps an executable its easier and more consistent to derive your task from ExternalProgramBase. This base class handles all the mechanics of calling the process and gathering its output and error streams - saving you from having to duplicate it.

Ian


Garrett Smith wrote:





I've submitted a patch (#953622) that provides the ability to update source via ClearCase. Send me a message if you have any questions.

Best,
Garrett















--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com




-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
NAntContrib-Developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to