git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Import ClearCaase with history?

From
COCharles O'Farrell <charleso@gmail.com>
Date
Mar 31, 2010, 12:16 UTC
Message-ID
<loom.20100331T135240-261@post.gmane.org>
In-Reply-To
<1270035189.2785.11.camel@chumley>
Hi David,
Show 11 quoted lines
> I've seen programs that purport to import Subversion (which is also
> good, as they also are using Subversion for other projects....) but do
> any such programs exist for Clearcase?
> 
> I know that, in theory, it would be possible to 
>   for all checkins to Clearcase
>      check out of Clearcase
>      check into git
>   done
> 
> but that would take an incredibly long time in practice, wouldn't it?
Well it certainly isn't lightning quick, but it's not 'incredibly' slow either. 
http://github.com/charleso/git-cc

It uses 'cleartool lshistory' to retrieve the changes to a given view, and then 'cleartool get' to download the contents, which can then be added directly to Git. In practice this is reasonably quick, although it depends on the size of your history. I've seen it take a few hours to complete the first step with a medium sized VOB, but once that's complete it's (relatively) quick to fetch the actual files. Git-cc is actually a bridge, and can be reused in this way to retrieve new content after an initial import (which is much, much quicker). Changes can also be pushed back to Clearcase.

As a word of warning, given the way in which Clearcase works you're not technically retrieving the full and complete history; as such a thing is almost impossible to export from Clearcase. What you see is the history of all the _currently_ visible files in your _current_ view. So, for example, any files that have been deleted or moved are completely ignored in the lshistory output. If this is unacceptable the only other option would be to manually modify the config spec to include this missing elements and take 'snapshots' of the history over time.

It's by no means as good or as complete as git-svn; partly because Clearcase is so tricky and partly because I'm so lazy. I hope this helps in some way though.

Cheers,
Charles
PS. Take a look at the Git tools wiki page for some other alternatives.
https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools
Previous: Jon SeymourNext: Peter Baumann
Message 3 of 5 in “Import ClearCaase with history?”
  1. David HagoodMar 31, 2010
  2. Jon SeymourMar 31, 2010
  3. Charles O'FarrellMar 31, 2010
  4. Peter BaumannMar 31, 2010
  5. Avery PennarunMar 31, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.