What tools are available to migrate from clearcase to mercurial? Is it possible to move history? What kind of limitations are there?
2 Answers
Do not forget that ClearCase (Central VCS) and Mercurial (Distributed VCS) are very different.
See Core ClearCase concepts for a full list.
In the case of a migration, that means you are dealing with a repository-centric VCS (Mercurial) which implies "working with timelines" (a timeline being a commit, building a new changeset)
In ClearCase though, there is no global timeline, as each file is committed individually (file-centric VCS).
So for a migration, you need to setup a ClearCase dynamic view with a config spec you will change to list all relevant "ClearCase timelines" (labels for non-UCM views or even better: baselines for UCM views) and import that fixed state into Mercurial.
And repeat the process until the most recent label/baseline.
The idea is: there is often no need to import the all history of all the files when migrating from ClearCase to another (D)VCS. Only the "significant" changes need to be recorded.
I would not recommend the "Conversion of ClearCase repo to Mercurial" article, especially for large and old ClearCase repositories.
See also SVN migration for other considerations.
-
Why not the recommandation of "Conversion of ClearCase repo to Mercurial" ? Because it will take up too much space and time to make it ? I kinda need that full import. At least to have it under a free of charge repository system like git. Then, when archived, maybe we could just begin with a new git repo with the full history not available and just there for reference purpose ? – Dolanor Jan 24 '13 at 10:49
-
@Dolanor ClearCase exports poorly to a revision-based system because it is file-centric: meaning each version are created independently for each file (as opposed a single revision on a commit for the *full* repo). Hence, it is harder to extract successive state of the ClearCase repo to export into a revision-based VCS (SVN, Hg, Git, ...). I usually keep the ClearCase repo in read-only mode for archive, and import only the last few tags or baselines. Much quicker that way. – VonC Jan 24 '13 at 11:19
-
That's true, but keeping an archive of clearcase makes you need a ClearCase license if you want to view it. Having it under a free source control means archive for free. But more work to do it. I already tried the [git-cc tools](https://github.com/charleso/git-cc) but have problems with it. I'll try to fix it or create another tool for my needs – Dolanor Jan 25 '13 at 15:48
-
@Dolanor good point. I look forward seeing your tool on GitHub ;) – VonC Jan 25 '13 at 16:06
-
Don't you worry I will, or patch git-cc. Just need to understand the crazy functionning of clearcase to do it. The git-cc did a lshistory that did a backward history listing given my configspec. Thus, stuff which should have been on main branch were displayed on /JUNK_TO_DELETE/ since day 1. I guess my configspec need to be updated each time I check the history. It will be long and painful I guess ^^' – Dolanor Jan 25 '13 at 16:12
You might start on the mercurial site at Information for Clearcase/UCM Users and at Conversion of ClearCase repositories to Mercurial

- 17,605
- 2
- 49
- 65