tags:

views:

579

answers:

1

TFS shows some pending changes under my name, but I have not changed anything. When I check in and see View Pending changes, I see some of the changes which I have never made, changes pending under some other user might be shown as my pending changes. When I unselect and check-in my changes, these are still locked under my name? Is this due to auto-checkout or any other reason? (TFS policy requires a compile before check-in)

+2  A: 

This is probably due to the automatic checkout feature in TFS.

TFS uses an atomic check-in process and is very careful about recording who did what. When you start editing a file (or the IDE edits one on your behalf, for example a .csproj or .vbproj file) then the file will show up in your pending changes list to show you that you have the file checked out with an edit pending.

To see your pending changes list, go to View, Other Windows, Pending Changes in Visual Studio.

To check-in any pending changes you can right click on the file in solution explorer or you can select it in the pending changes view. Only then will the change be committed into version control. From the pending changes view you can compare with the server version to see what changes you have made.

To see the changes that have been committed to the server you can right click on a file or folder and select "View History".

If you want to remove the pending change and restore the file to what it was before you edited it you can right click on the file and select "Undo Pending Changes".

If you want to change the auto check-out behaviour to prompt you before it performs a check-out, then go to Tools, Options, Source Control, Environment and change the Checked-in items for Saving and Editing to "Prompt for check out" rather than the default which is "Check out automatically".

Hope that helps,

Martin.

Martin Woodward