Importing Mercuial(hg) repository to Team Foundation Services

人走茶凉 提交于 2019-12-24 17:39:09

问题


I'm looking for any suggestions or tools that can be used to migrate a Mercurial(hg) repository on a Windows 7 system to a TFS repository on Visualstudio.com. I currently use TortoiseHg to interface with the Mercuial repository. I had found a post that says i can be done with SVNBridge but no details and it didn't makes sense to me since SVN is different than Mercurial.


回答1:


If you are using Git version control for your VSTS repository, you can use Hg-Git mercurial plugin to convert a hg repository to Git repository.

A link for your reference: Easy Migration from Mercurial to Git

If you are using Team Foundation Version Control (TFVC) for your VSTS repository, there isn't any tool to migration it directly as I know. But you can convert the Mercurial repository to Git repository first and then use git-tfs to convert the Git repository to TFVC repository.

Update: You can following the steps below to do this:

  1. Create a new folder.

  2. Navigate to the created folder and run "git-tfs clone https://xxxx.visualstudio.com/DefaultCollection/ $/Project" command. This will create a local git repo in the folder.

  3. Open the git repo folder and run "git remote add origin " command.

  4. Run "git pull origin yourbranch" command.

  5. Run “git-tfs checkin" command.



来源:https://stackoverflow.com/questions/36507797/importing-mercuialhg-repository-to-team-foundation-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!