Forum Discussion

Omri_Bashari's avatar
New Contributor
13 years ago

CodeCollaborator and ClearCase integration

Hello everyone,

I have been evaluating CodeCollaborator for my company for a while now.

We are working with IBM Rational ClearCase as our SCM and it is very important for to have the code review workflow as intuitive as possible.

Specifically, I have been focusing on adding new files to a review.

For reasons related to our current process, we must perform reviews only on checked-in files. Also, we don't use clearcase activities, and manually entering file versions is out of the question. This makes the current CodeCollaborator GUI client almost useless to us.

I am working on integration into the ClearCase context menu ("Send To..."). I created a simple C# console application that has two functions:

1. Can take a list of files as arguments (for example, from "Find checkouts"), query their predecessor version, check them in if necessary and use ccollab addversions to add the file's two latest versions to a new review.

2. Can take a file@@version format and add it to a review against the local file version using ccollab addversions.

After many trials I got this working reasonably well, but I still have a problem with new reviews.

I did not find a way to send ccollab addversions multiple files so I have to call it for the first file with the "new" review argument, and for later files with the "last" review argument. This is not clean or efficient and it opens the browser window when only the first file is present in the review. I would like to have a script to open a new review with the list of files and their versions in one go. Is that possible?



3 Replies

  • ebrown_1's avatar
    SmartBear Alumni (Retired)


    As you point out, the scenario of an SCM where there are no changelists and where code reviews are post-commit requires more work on the part of the review author, who must manually create the changelist.  The addversions command was created for precisely this reason, and it was designed to take a list of files and versions as input.  I apologize if how to do this wasn't clear from the documentation, but you can also run "ccollab --scm clearcase help addversions" to see the syntax and examples specific to ClearCase.

    Here's an example input file:

    hello.c /main/test/9 /main/3

    world.c /main/test/5 /main/3

    Then to create the review, pipe the contents to the addversions command:

    ccollab addversions new < fileversionlist.txt

    If there are more tasks you want to perform when creating the review, you can instead create a batch xml input file to create the review and then do additional tasks like adding materials, participants, start the review, etc.  See the documentation or run "ccollab help admin batch" for more info.

    Hope this helps,


  • Eric,

    Great, this is exactly what I needed. I tried this before but it didn't work for some reason so I thought it was only for multiple versions, not multiple files.


  • Hi Eric,

    I have another question.

    In case new files were added and are reviewed, we need to have their latest directory version stored in the review (for our process).

    Does CodeCollaborator support directory diff? If so, what is the correct way to use addversions for directories? I couldn't get it to work.

    If not, what's the best way to have this information stored in the review?