How can I get a specifc version separately?
What would be a quick and easy way to get a specific changeset for a folder, file or visual studio project from TFS to a separate directory without overriding the curent local version of my workspace? I often just need a copy of our source code from an earlier version.
The only soultion I have found so far is to create a separate workspace with a new directory mapping. But when I then want to continue to work with the original workspace, it seems that I need to delete that new workspace, because otherwise TFS will complain. This seems rather tedious to me and isn't really practicable.
Isn't my desire to get a specific version as a separate copy a common scenario? Why is this so hard in TFS?
Maybe my workflow just sucks and it is so开发者_开发技巧me sort of bad practise? Maybe MS made it hard to do what I am trying to on purpose?
Couldn't you just get the changeset you want, copy it somewhere else and then get latest to overwrite the older changeset?
Maybe I'm not completly understanding your problem, but: When you choose history from the context menu of a file or folder, you can then open the file as a seperate file.
As a note, if you have two workspaces and you want to switch between them, there is no need to delete anything. Just make sure you go to the workspace drop down list in source control explorer and/or pending changes and select the right one to change context. Obviously if you are working on projects in both workspaces then you'll need to open/close projects from the appropriate working folders.
That said, if you are just doing a history comparison to see what's changed then you can do a folder level comparison to a specific changeset and there's no need to actually do a checkout.
If you are making changes because you need to do hotfixes then I'd suggest branching from a specific changeset instead of switching workspaces. The reason being that checkins on the second workspace would still be affecting the code in your primary workspace since they both point to the same folder(s) in source control.
精彩评论