A mess after renaming TFS 2010 branch, and making

2019-06-14 02:09发布

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条回答
We Are One
2楼-- · 2019-06-14 02:53

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.

查看更多
登录 后发表回答