Question

My goal is to have the "latest version" of my code be that of an existing changeset. I choose Roll Back, and roll back to that specific changeset, but my code doesn't change to reflect the changeset's code. Additionally, I tried "Get Specific Version" for that particular changeset, and while my local code changes to the changeset's code, the column in TFS that says "Latest" shows "No" for those files that were reverted - see screenshot below. The screenshot below is a result of "Get Specific Version":

enter image description here

QUESTION: What's the difference between "Get Specific Version" and "Roll Back"? If my goal is to essentially change my current code base to the code base from an existing changeset, and have that as the "latest version" (for TFS reasons - I'm trying to deploy out to our web server using TFS, but since TFS "doesn't have the latest version" - see screenshot above, it uses the current, latest version which is not what I want it to use - I want it to deploy from the code base for the previous changeset), how can I do that?

Was it helpful?

Solution

If you "Get Specific Version" you are changing your local workspace version to that of a previous version on the server. This does not affect the latest version on the server. (You could, of course, check out that path and check it in, which would affect the latest version on the server.)

If you "Roll Back" you are changing the server version. Depending on how you perform this action, you may not be changing your local workspace version. If you do a "Get Latest Version", you will sync up to that latest version.

OTHER TIPS

If you simply want to build/deploy an older version of the code the default build templates allow you to specify a changeset number (or date) and force it to use an older version of the code.

If you really do need to change the "current" code in TFS, then you can do rollback. But it sounds like your understanding of Rollback is incorrect. It's not "rollback to this changeset", rather it's "rollback the changes contained in this changeset".

So if your latest version is v9 and you want to go back to v5, you need to rollback changesets v6-9. You can highlight all 4 of these changesets and roll them back all in one operation. Then check-in.

This will give a better experience than trying to do a get on an older version then check-out/check-in. The history will more accurately reflect what you did, and the conflict resolution dialog won't try and do the wrong thing (as it would if you did a get then check-in/out).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top