Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving code from mercurial to TFS

Tags:

mercurial

tfs

We are planning to move to TFS. While i hate it we have to do it for various reasons.

  1. We have dev, staging and live branch. Do we move the source for each of the branch to TFS as separate folder and convert it to a branch later on?

  2. Is it possible to take history along?

  3. Is there a tool or a script which can do it?

like image 991
user460025 Avatar asked Sep 17 '12 20:09

user460025


1 Answers

I've not been able to find a way to convert directly from Mercurial to TFS. It looks like your best bet could be to convert your Mercurial repository to a Git repository and use git-tfs to push those changes to TFS.

I'm not familiar with Git or TFS so you'll have to do some more research to find out the exact steps but here's how I think that I'd go about it:

  1. Convert your Mercurial repository to a Git repository (perhaps this will help)
  2. Create your empty TFS repository
  3. Clone your TFS repository using this page as a guide
  4. Use git to push your converted Mercurial Git repository to the TFS Git repository
  5. Use git-tfs to push those changes to TFS

I don't know if that will copy all the history over or if you'll just have one check in with the final copy of the code.

like image 82
Steve Kaye Avatar answered Oct 21 '22 13:10

Steve Kaye