Friday, March 16, 2012

TFS: Compare with workspace version

Microsoft's Team Foundation Server provides different ways to compare your edited file with different versions. Among them are:
1. Unmodified Version
2. Workspace Version
3. Latest Version

Option 1 & 3 are self-explanatory however it is worth noticing the difference between WorkSpace version & Latest version.
WorkSpace version VS Latest Version
Comparing with workspace version actually compares the edited file with the version of file at the time you checked out. But comparing with latest version compares the edited file with latest version of file present at your code repository i.e. it might include changes made by your colleagues.

E.g. Say you check out a file on 1st november and did some changes till 3rd november. Now on 3rd november if you try to compare your edited file with Workspace version tfs will compare the edited file with the file present in tfs on 1st november (i.e. the time at which you checked out the file). It might be possible that your fellow colleagues made some changes to that file till 3rd november. So comparing the edited file with latest file with show those changes, basically it will compare the edited file with the latest version of that file.

In most of the scenario, programmers work on latest code (and it's a good practice that you atleast take latest code once in a day) that's why both option results in same output.

No comments:

Post a Comment