threads / discuss / 23269

Import ClearCaase with history?

Subject: Import ClearCaase with history?

## tl;dr

5 messages between Mar 31, 2010 and Mar 31, 2010.

replies: 4people: 5as markdown or json

David Hagood· Mar 31, 2010, 11:33 UTC · lore

I am trying to drag where I work into a more modern software development process, but I am getting resistance from one division that has a large amount of history for some projects in a Clearcase repository. If I could show them that we could import all that history into git, it would go a long way to removing that resistance.

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?
Jon Seymour· Mar 31, 2010, 12:13 UTC · re: David Hagood · lore

Re: Import ClearCaase with history?

On Wed, Mar 31, 2010 at 11:33 PM, David Hagood <david.hagood@gmail.com> wrote:
Show 17 quoted lines
> I am trying to drag where I work into a more modern software development
> process, but I am getting resistance from one division that has a large
> amount of history for some projects in a Clearcase repository. If I
> could show them that we could import all that history into git, it would
> go a long way to removing that resistance.
>
> 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?
I have no idea whether this is any good, but you might look at:
   http://www.clearvision-cm.com/clearvision-products/clearcase-and-git-bridge-cc2git/ash_flypage.tpl.html

I am sceptical that the performance could be anything other than glacial but I don't have any experience with it...

jon.
Show 7 quoted lines
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Charles O'Farrell· Mar 31, 2010, 12:16 UTC · re: David Hagood · lore

Re: Import ClearCaase with history?

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
Peter Baumann· Mar 31, 2010, 15:39 UTC · re: David Hagood · lore

Re: Import ClearCaase with history?

On Wed, Mar 31, 2010 at 06:33:09AM -0500, David Hagood wrote:
Show 18 quoted lines
> I am trying to drag where I work into a more modern software development
> process, but I am getting resistance from one division that has a large
> amount of history for some projects in a Clearcase repository. If I
> could show them that we could import all that history into git, it would
> go a long way to removing that resistance.
> 
> 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?
> 

I don't think you can build anything which will import from ClearCase *without* loosing *some* history. At least I have build a script which imported something from CC into git in my former job and allow me to sync bidirectional with CC.

The problems where no bidirectional mapping exists are the following:
  - CC is file based, where as GIT is tree (the whole repository) based
  - This leads to problems where you merge a file on differen CC branches,
    because in GIT a merge is only on the whole tree, so at least this
    information is lost. (see cleartool lstree for a file with merges)
Peter
Avery Pennarun· Mar 31, 2010, 16:09 UTC · re: Peter Baumann · lore

Re: Import ClearCaase with history?

On Wed, Mar 31, 2010 at 11:39 AM, Peter Baumann <waste.manager@gmx.de> wrote:
Show 8 quoted lines
> On Wed, Mar 31, 2010 at 06:33:09AM -0500, David Hagood wrote:
> The problems where no bidirectional mapping exists are the following:
>
>  - CC is file based, where as GIT is tree (the whole repository) based
>
>  - This leads to problems where you merge a file on differen CC branches,
>    because in GIT a merge is only on the whole tree, so at least this
>    information is lost. (see cleartool lstree for a file with merges)

Of course, you can do such file-by-file merges in CVS and SVN as well, and importing into git seems to work okay. What doesn't get tracked is the actual merge history of the merged files. This isn't such a problem when importing CVS and SVN, which mostly don't track merge history anyway :)

Have fun,
Avery

← back to recent threads