A mess after renaming TFS 2010 branch, and making a new one in the same name

回眸只為那壹抹淺笑 提交于 2019-12-23 04:39:10

问题


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.

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...

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.

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.

Thanks in advance.


回答1:


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

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.



来源:https://stackoverflow.com/questions/12144909/a-mess-after-renaming-tfs-2010-branch-and-making-a-new-one-in-the-same-name

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