ClearCase/Gerrit Integration

205 views
Skip to first unread message

Alex Karnovsky

unread,
Jul 18, 2016, 5:54:30 AM7/18/16
to Repo and Gerrit Discussion, tge...@almtools.com
Hello,

Has anybody ever heard about ClearCase/Gerrit Integration? I would like to be able to create a ClearCase trigger, which would fire on an attempt to deliver and would pass the change set to Gerrit for a review.

Do you think it is possible? Any ideas are welcome!

Thanks,

Alex

Luca Milanesio

unread,
Jul 18, 2016, 10:18:55 AM7/18/16
to Alex Karnovsky, Repo and Gerrit Discussion, tge...@almtools.com
Hi Alex,
Gerrit is a code review on top of Git, it does work on top of ClearCase.

ClearCase is a quite old and obsolete version control, why not migrating it to Git instead of looking for a code review on top of it?

Luca.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Karnovsky

unread,
Jul 18, 2016, 10:36:51 AM7/18/16
to Repo and Gerrit Discussion, al...@dralex.com, tge...@almtools.com
Hello Luca,

Thank you for your answer.

I am asking because we have a client, who is maintaining a large old project in ClearCase. He has no intention to move it to Git, but he would like to use modern code review tools.

Alex

Gaurav Negi

unread,
Jul 18, 2016, 12:09:38 PM7/18/16
to Luca Milanesio, Alex Karnovsky, Repo and Gerrit Discussion, tge...@almtools.com
//it does work on top of ClearCase.

Bit surprised though how?
Unlike GIT, Clearcase is client server architecture
Also version on ClearCase is file by file, not commit based like GIT.

Thanks
-Gaurav

Alex Karnovsky

unread,
Jul 18, 2016, 12:31:49 PM7/18/16
to Repo and Gerrit Discussion, luca.mi...@gmail.com, al...@dralex.com, tge...@almtoolbox.com
I will re-phrase my question:

Forget ClearCase. Forget version control. I want to be able to send two variants of a project (not just of a single file!) to Gerrit and ask it to perform a code review.

Is it possible?

Jonathan Nieder

unread,
Jul 18, 2016, 1:06:53 PM7/18/16
to Alex Karnovsky, Repo and Gerrit Discussion, luca.mi...@gmail.com, tge...@almtoolbox.com
It might be possible to do one-off diff reviews with gerrit, but you'd be fighting against the tools. What gerrit excels at is managing the process of applying code to your codebase. In other words, it takes on the role that a human maintainer could have been taking on before: judging consensus about what is an appropriate change to a codebase in then applying it.

One way to handle this with clearcase would be to make Gerrit responsible for applying the reviewed changes to your clearcase repository. You can use the ref-updated hook <https://gerrit-documentation.storage.googleapis.com/Documentation/2.12.3/config-hooks.html> to apply each submitted change to ClearCase.

If others in the project are also making changes to ClearCase behind gerrit's back, you would also need to set up mirroring in the opposite direction, to update the git repository that Gerrit is managing whenever the version in ClearCase has been updated.

So it should be possible to use Gerrit in the standard way for a project backed by ClearCase, after some work setting it up.

David Pursehouse

unread,
Jul 18, 2016, 11:31:03 PM7/18/16
to Gaurav Negi, Luca Milanesio, Alex Karnovsky, Repo and Gerrit Discussion, tge...@almtools.com
On Tue, Jul 19, 2016 at 1:09 AM Gaurav Negi <gaura...@gmail.com> wrote:
//it does work on top of ClearCase.

Bit surprised though how?
Unlike GIT, Clearcase is client server architecture
Also version on ClearCase is file by file, not commit based like GIT.


I guess that was a typo and Luca intended to write "doesn't".

Luca Milanesio

unread,
Jul 19, 2016, 10:17:15 AM7/19/16
to Alex Karnovsky, Repo and Gerrit Discussion, tge...@almtools.com
Yes, it was a typo :-)

On 18 Jul 2016, at 15:18, Luca Milanesio <Luca.Mi...@gmail.com> wrote:

Hi Alex,
Gerrit is a code review on top of Git, it does work on top of ClearCase.

GERRIT *DOES NOT* work on top of ClearCase ... unless you really want to make violence to both and make your life a nightmare using them together :-)

Luca.

Igor

unread,
Jul 19, 2016, 10:22:16 AM7/19/16
to Repo and Gerrit Discussion, al...@dralex.com, luca.mi...@gmail.com, tge...@almtoolbox.com
At my previous work we had a team that worked with git on a project, which originated from ClearCase UCM. So we had the following setup:
  • each ClearCase baseline was pushed to gerrit and a git tag was created
  • users created their changes from relevant git tags and sent them to Gerrit
  • after completing code review in Gerrit git patch was created out of change and sent to a ClearCase client machine
  • on ClearCase client a disposable snapshot view was created out of relevant baseline and initialized as git repository
  • an activity was created (in our case creation of activity was semi-automatic, because it required filling in some text fields)
  • patch received from git was applied to snapshot view and all modifications added to ClearCase
This seems a bit complicated, but worked well.

luca.mi...@gmail.com

unread,
Jul 19, 2016, 10:29:23 AM7/19/16
to Igor, Repo and Gerrit Discussion, al...@dralex.com, tge...@almtoolbox.com
Do you believe you can share the scripts?

Luca

Sent from my iPhone

Igor

unread,
Jul 20, 2016, 12:41:30 PM7/20/16
to Repo and Gerrit Discussion, igor.lit...@gmail.com, al...@dralex.com, tge...@almtoolbox.com
I was able to find only the part that copied ClearCase baselines to Gerrit and created tag, see attachment.

Will try to find other parts and send them as well.
CCBL2Git.zip
Reply all
Reply to author
Forward
0 new messages