重命名TFS 2010分支并使用相同名称创建新分支后,情况一片混乱 [英] A mess after renaming TFS 2010 branch, and making a new one in the same name

查看:109
本文介绍了重命名TFS 2010分支并使用相同名称创建新分支后,情况一片混乱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在开发环境中具有以下源代码控制结构:
Main分支是所有分支的根,而Development分支是Main的儿子。
现在,我最近在Main分支上进行了重命名,现在将其命名为OldMain,然后从Development中创建了一个新分支,我将其称为Main。

We have the following source control structure in our development environment: a Main branch, which is the root of all branches, and a Development branch, which is the son of the Main. Now, I recently did a "Rename" on the Main branch, and now it's called OldMain, and after that created a new branch from Development, which I called it Main.

完成这些操作之后,我意识到它有一些奇怪的行为:OldMain分支失去了他的历史,无法恢复,而New Main分支抓住了旧分支的历史。名称相同,这会导致不一致,因为现在Main分支中的代码具有伪造的历史记录……

After I finished with those operations, I realized that it has some strange behavior: The OldMain branch lost his history, which can't be retreived, and the New Main branch "caught" the history of the old branch of the same name, which makes unconsistency, because now the code in the Main branch holdes a fake history...

我应该事先检查过进行此类操作的注意事项(不知道tfs 2010中的Rename操作实际上是一个分支+删除),但是现在我需要知道如何解决此不一致问题。

I should have checked the precautions of doing such operations beforehand (Didn't know that the Rename operation in tfs 2010 is actually a branch+delete), but now I need to know how to fix this unconsistency.

还原这两个操作(还原变更集),然后签入,是否会完全失去原始Main的历史记录?

If I try to revert both operations (Revert Changesets), and checkin, am I going to lose the history of the original Main completely?

我需要一些有关操作的建议。

I need some suggestions about what to do.

预先感谢。

推荐答案

您仍然可以从命令行获取此历史记录,而不仅仅是通过UI。

You can still get this history from the command line, just not through the UI.

http://connect.microsoft.com/VisualStudio/feedback/details/538032/tfs-2010-does-not-display-history-for-a-renamed-folder

http://blogs.msdn.com/b/mitrik/archive/2009/05/28/changing-to-slot-mode-in-tfs-2010-version-control.aspx

如果您搜索 tfs重命名分支并保留历史记录,那么Google上还有很多其他信息。

There is a bunch of other info on google if you search for 'tfs rename branch and keep history'.

此外,您可以重命名分支,历史记录将得到修复。

Also, you can rename your branches back and the history will be fixed.

这篇关于重命名TFS 2010分支并使用相同名称创建新分支后,情况一片混乱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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