0
votes

I mapped a project to a local directory, pressed the Get Latest Version button, downloaded the project, and edited some code. But the files I edited aren't shown in the Pending changes window, and their status is Latest = Yes. Please take a look at the screenshot below.

enter image description here

The command TF status says there are no pending changes.

C:\Users\Dmitriev_M\ADT-Workspace\My-Project>TF status
There are no pending changes.

However, if I right-click build.xml and press Compare, I can see the lines I edited, deleted, or added. The screenshot is below.

enter image description here

The workspace in the Pending changes window is the same as the workspace in the Source Control Explorer window.

I right-clicked the mapped folder in the Source Control Explorer, pressed Refresh, pressed Refresh in the Pending changes window, but nothing changed.

1
have you tried checking out the file from tfs? - Just TFS
@JustTFS, if I right-click a file and press Check out for Edit instead of Get Latest Version, the file will be shown as edited by me although I haven't modified it. Here is the link where I found about Check out for Edit. - Maksim Dmitriev

1 Answers

2
votes

You are using TFSVC on tfs 2010 / VS2010 or a similar combination. this version only used server workspaces. with a server workspace TFS needs to know what is happening with the files. For TFS to know that you want to make a change you will check out the file for edit. you can then make any changes that you want, or make no changes at all. when you come to check in that file it will be scanned against the version stored in TFS, if changes have been made then the file will be submitted to source control, if no changes have been made then the file will not be checked in and you will recieve a message that nothing had changed other than locks.

In later version of TFS a local workspace was introduced for TFSVC, this will automatically pick up any pending changes in the workspace at it scans the local directory.

i would assume that you would have been prompted to overwrite your file locally as TFS would still have a lock (read Only Flag) on the file.