I have a client who is rather insistent about using Clearcase. Are there any tools/scripts that would allow my team to work against an SVN repository (or really anything other than Clearcase), but periodically automatically sync back changesets to the Clearcase VOB?
My thinking is that if such a tool exists, and it's automatic, reliable, and transparent the client might be pursuaded to allow us to work against SVN.
Thanks, Kent
There is also a commercial tool from Clearvision for just this purpose which is available here:
http://www.clearvision-cm.com/clearcase-subversion-git-mercurial-integration.html
It can sync clearcase with either subversion, git or Mercurial.
If clearcase has command line support you will be able to write a script to check into clearcase, and configure svn to execute it automatically when code is committed (post-commit hook)
I use Git directly within a ClearCase view.
Then I could
git2svn
back the content to SVN if I had a SVN repo to synchronize with.Note: for a tool to work directly within a ClearCase view, I have to use a snapshot view, in order to write in files even if they are not checked out yet. Then for any activity I consider finished, I update the snapshot view which allows me to list all "hijacked" files. I check-out them, then check-in them.
The issue I would see with working with SVN in this case (ClearCase repo for the client) would be to:
At least, with Git, you have:
We needed exactly this for a project I was on. The team was more comfortable in svn, and the corporate standard was ClearCase. So I wrote a script to continously migrate trunk to clearcase, and ran it on our build server.
I've put the script here: http://dvae.net/blog/2009/09/clearcase-to-svn/
What we did was to set up a job on our build server that ran periodically and did a migration using clearfsimport. We used Luntbuild as the build server, but cruise control would work fine too. Like a normal build, we set the script to be run only when svn modifications where detected. We had the job run every 20 minutes as the ClearCase server was in a different country and all operations were slow and a sync took 40 mins to run. I suggest running as often as you can.
The script is based on ClearCase UCM, if you are not then have to remove the 'cleartool mkact' and at the end create a label instead of a baseline.
I set the clearcase comment to be a concatenation of all SVN commits since the last sync.
I found it reliable, and the only reason it would fail was if Clearcase triggers (like the 'evil twin' trigger) stopped the checkin. When that happens the build fails, Lunbuild sends an email, and I then have to manually do a reverse history merge to get rid of the evil twin problem, commit and re-run.
Just FYI : It might be useful to you in some way : Moving from SVN to ClearCase
This doesn't sync the data, but if you need to migrate over, it might help out.
Yes, CollabNet offers a commercial product specifically for that purpose, called the CollabNet Subversion Connector.