4
votes

I am working on a C# project, source code of which is stored on a TFS version control system server.

What is the difference between "Undo Pending Changes" and "Get Specific Version" with all of the overwrite checkboxes set? What purpose does each function serve and in which scenario should each be used?

Get specific version dialog

Also, just to clarify, if I have made some changes and I use the "Get specific version", changes are still there.

Thanks.

2
I would think that it depends on what version you have checked out and what version you select for "Get Specific Version". If you are selecting the same version you have checked out, then I would guess you'd get the same results. Personally I'd only use "Get Specific Version" when I want a different version from what I have and "Undo Pending Changes" for the specific case of undoing anything I have not yet checked in. - juharr

2 Answers

3
votes

With "Undo Pending Changes", the workspace will revert back to the state when you did get-latest or get-specific-version last time. Undoing will not get the new changes made to the source control after your last get-latest or get-specific-version). On the other hand "Get Specific Version" with overwrite checked will update all files in your workspace, except for the ones that are checked out.

3
votes

"Undo pending changes" will undo all the changes that you made to the file and restores the file to the version of the file which you started editing/making changes.

"Get Specific Version" (with both overrides) will get the latest version of the file from the TFS server.

  1. If there is no pending change/checkout, then the file will be overwritten with the latest version from TFS.

  2. If there is a pending change/checkout on the file:

    a. If it's a conflicting change (for example: same line change), then the operation would bring up the merge editor and we need to fix the conflicts just as we do during merges.

    b. If it's non-conflicting change, the file will be overwritten with latest change from server but the local changes will be preserved.