将Mercuial(hg)存储库导入Team Foundation Services [英] Importing Mercuial(hg) repository to Team Foundation Services

查看:70
本文介绍了将Mercuial(hg)存储库导入Team Foundation Services的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找可用于将Windows 7系统上的Mercurial(hg)存储库迁移到Visualstudio.com上的TFS存储库的任何建议或工具.我目前使用TortoiseHg与Mercuial存储库进行交互.我找到了一条帖子,说我可以使用SVNBridge完成操作,但没有细节,对我来说这没有意义,因为SVN与Mercurial不同.

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.

推荐答案

如果您对VSTS存储库使用Git版本控制,则可以使用 Hg-Git商业插件,用于将hg存储库转换为Git存储库.

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.

供您参考的链接:从Mercurial轻松迁移到Git

如果您将Team Foundation版本控制(TFVC)用于VSTS存储库,那么据我所知,没有任何工具可以直接迁移它.但是您可以先将Mercurial存储库转换为Git存储库,然后使用 git-tfs 进行转换将Git存储库转换为TFVC存储库.

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. 创建一个新文件夹.

  1. Create a new folder.

导航到创建的文件夹,然后运行"git-tfs clone https://xxxx.visualstudio. com/DefaultCollection/ $/Project"命令.这样会在文件夹中创建本地git repo.

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.

打开git repo文件夹并运行"git remote add origin"命令.

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

运行"git pull origin yourbranch"命令.

Run "git pull origin yourbranch" command.

运行"git-tfs签入"命令.

Run "git-tfs checkin" command.

这篇关于将Mercuial(hg)存储库导入Team Foundation Services的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆