SVN to Clearcase Export

2019-02-05 07:34发布

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

7条回答
戒情不戒烟
2楼-- · 2019-02-05 08:17

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.

查看更多
小情绪 Triste *
3楼-- · 2019-02-05 08:18

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)

查看更多
我命由我不由天
4楼-- · 2019-02-05 08:26

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:

  • introduced another central repository (meaning to commit, you have to have access to your private central SVN repository, and, for "to-the-client commits", to have access to the central ClearCase VOB - Version Object Base, the "repository" in ClearCase lingo).
  • introduced another branch modeling, where in SVN, it is a cheap copy within a directory, whereas in ClearCase, it is a metadata (branch) not represented as a directory. That means the physical tree of a SVN checkout might not match a snapshot view update in ClearCase, because some of the directories checked out by SVN will simply not exist in ClearCase.

At least, with Git, you have:

  • private repository (you are not adding another central repository everyone should have access to)
  • same branching model (at least when it comes to "not representing a branch by a directory")
查看更多
相关推荐>>
5楼-- · 2019-02-05 08:26

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.

查看更多
该账号已被封号
6楼-- · 2019-02-05 08:26

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.

查看更多
Fickle 薄情
7楼-- · 2019-02-05 08:28

Yes, CollabNet offers a commercial product specifically for that purpose, called the CollabNet Subversion Connector.

查看更多
登录 后发表回答