Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing branches #21

Closed
philpem opened this issue Aug 30, 2012 · 3 comments
Closed

Importing branches #21

philpem opened this issue Aug 30, 2012 · 3 comments

Comments

@philpem
Copy link

philpem commented Aug 30, 2012

Can git-cc be made to import branches and merges (hyperlink data) from Clearcase?

At the moment it seems I can either:
Specify "branches=release" and get all the "merge of branch foo into release" changesets, or
Specify "branches=*" and get every single Clearcase commit mashed into multiple commits on the git master branch (with no branching/merging imported)

What I'd like is to have Clearcase branches (the feature/bugfix branches) and merge hyperlinks (where said branches have been brought into the release tree) imported into Git so I can see how the code has changed over time.

@charleso
Copy link
Owner

Hi Phil,

I'm afraid not. As you've discovered the branches configuration will basically filter the commits into a single git branch. Things in Clearcase get very complicated when you start talking about merging largely because it doesn't have the concept of an atomic commit. I wish I could have got this working as you've described; believe me when I say I spent a fair bit of time thinking about it. The closest I got was in the Java version of git-cc which I wrote just at the end of my Clearcase days.

This is the file/branch in question (the cleartool branch only):

https://github.com/charleso/gitcc4j/blob/cleartool/ClearGit/src/gitcc/cmd/Rebase.java

I used this version to import our repository into Git as part of a final migration (which is why I don't work on git-cc any more). Part of the problem was that I used 'git merge --strategy=ours' to fake the merges, and the history was all messed up as a result.

If you're familiar with Java that might be a good place to start, otherwise I'm afraid there isn't much you can do. There is also the Clearvision import tool, but that comes at a price. :(

Cheers,

Charles

@philpem
Copy link
Author

philpem commented Aug 31, 2012

That's fair enough -- I'm trying out a two-step approach now - Polarion's Clearcase-to-Subversion translator apparently supports branches so I'm using that, then converting the SVN repository to Git.

Perhaps a little convoluted but hopefully it'll do what I need :)

Thanks,
Phil.

@charleso
Copy link
Owner

Ahh, I'd forgotten about that. I remember looking at that back when I first stated. If it does branches properly then that's a much better option. If it does, please let me know so I can recommend it to other people.

Good luck.

Charles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants