TFS 2010 中的分支并被迫重新下载代码
当我在 TFS 2010 中从主线创建分支时,我必须下载刚刚分支的所有代码。
我的笔记本电脑上已经有最新的主线版本,那么为什么 TFS 要求我有效下载硬盘上已有的内容?
即使我将主线文件复制到一个文件夹并将新分支映射到该文件夹,它仍然执行完全递归获取并阻塞我们的带宽 30 分钟左右。
这看起来像是浪费时间和带宽——他们是我不知道的解决方法/程序吗?
When i create a branch from the mainline in TFS 2010 i have to download all of the code i have just branched.
I already have the latest mainline version on my laptop so why is TFS requiring me to effectively download whats already on my hard disk?
Even if i copy the mainline files into a folder and map the new branch to this folder it still performs a fully recursive get and chokes our bandwith for 30 minutes or so.
This seems like such a waste of time and bandwith - is their a workaround/procedure that i am not aware of?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了更快地在分支之间切换,请尝试使用 tf get /remap 选项。来自布莱恩·哈利的博客:
请注意,这需要 TFS 2008 SP1 或更高版本。
For faster switching between branches, give the
tf get /remap
option a try. From Brian Harry's blog:Note that this requires TFS 2008 SP1 or later.
原因是 TFS 不知道您已下载分支。 “获取”行为实际上会在 TFS 数据库中放置一条记录,指示您工作区中的代码版本。这样,它就知道您是否有最新的。
令我惊讶的是,“获取”需要 30 多分钟。您的 TFS 服务器是远程的吗?您获得的二进制文件是否超出了您的需要?如果您有远程服务器,您可能需要考虑使用 TFS 代理来帮助提高性能。虽然它不能解决您遇到的这个特定问题,但它可能会加快其他开发人员的速度。
最后一个问题:为什么你要分支这么多?尽管我理解功能分支的想法,并且它增加了您需要分支的次数,但它仍然应该是相对罕见的情况。如果这种情况很少见,那么,是的,三十分钟的下载时间可能会很烦人,但您需要问问自己这是否真的是一个问题。
The reason for that is that TFS doesn't know that you have the branch downloaded. The act of "getting" actually puts a record in the TFS database that indicates which version of the code you have in your workspace. That way, it knows whether you have latest or not.
I'm surprised that a "get" is taking more than 30 minutes. Is your TFS server remote? Are you getting more binaries than you need to? If you have a remote server, you may want to consider using the TFS proxy to help with performance. Though it won't solve this particular issue you have, it may speed things up for other developers.
One final question: why are you branching so much? Though I understand the idea of branch on feature, and that it increases the number of times that you'll need to branch, it should still be a relatively infrequent occurrence. And if it is rare, then, yes, the thirty minutes to download may be annoying, but you'll need to ask yourself if it really is a problem.