PlasticSCM: Deep compare on pending changes - plasticscm

I am using PSCM6. I have 2 usecase problems (same solution) :
1.)
after updating server+client from V5 to V6 all my repositories are "dirty" - i.e. all files are listed in "pending changes". When I double-click a file PSCM shows "files are identical".
2.)
I have a Linux server which does not send the file time via FTP for some reason. I have a day-date but no time with minutes and seconds. When I transfer files from that server, my FTP client discards the date and sets the file date to the current time. Thus, all files are listed in "pending changes" again. On other servers I have to set a time-shift due to different time-zones. If I forget that, I have the same problem - the files are marked as changed.
My question:
Is it possible to run a deep scan for changes on all files which have been detected as being changed. Just comparing the date and giving no option for further change detection feels a bit clumsy to me - even if it is theoretically correct - because 2 files with the same content but different time stamps might be correctly treated as different files. But from a programmer point of view they are identical.
These are my "pending changes options" settings:

Plastic SCM has a preference to "Check content (hash) when the file timestamp is modified to set it as changed".
The preference is not in the "Pending Changes" view options.
But in the GUI --> Preferences --> Other options.

Related

What do all the options on GetOptions mean?

The MSDN documentation lists four options, with limited explanation:
Overwrite "Overwrite existing writable files if they conflict with the downloaded files." Does this apply to all files, or just ones we've told TFS we've edited?
GetAll "Gets all files." What files does TFS not normally get?
Preview "Executes a get without modifying the disk." This one seems pretty clear.
Remap "Remaps existing items on the disk to the server items where the content and disk location are not changing." I have no idea what this means.
Overwrite: will blindly overwrite writable files that you have not pended for edit. If you have marked a file as 'writable' then you have violated the contract with TFS and it assumes that you have done this for a good reason (eg, modifying the file without taking a checkout, because you were working offline). This will generally produce a writable conflict on the file, but if you specify this flag, then the writable file will be overwritten.
This only applies to server workspaces (local workspaces are always writable). This has no effect on files that you have pended for edit. Get will always produce conflicts for files that are edited locally and updated on the server; if you want to update files that are checked out, you must undo the checkout (or resolve the conflict with TakeTheirs).
Get All: will download every file and update it, even if TFS believes that the local version is the same as the remote version and that downloading a new version would be a noop. TFS tracks every version that you have locally, as well as remotely, so this is only useful if you edit files locally without checking them out.
If you have kept them writable, then then - as mentioned above - this will be a writable conflict. If you have then marked them read-only then TFS assumes that you have not made any changes and will not bother updating them when you do a get (because it knows the file contents haven't changed). If you have manually changed the file contents, then marking this will update those files to the server version.
Preview: will just fire events and provide results that indicate what would be downloaded with the given parameters.
Remap: is a clever option that allows you to perform an in-place branch switching (which is very common with some version control systems that branch at the repository level - like Git - but somewhat complicated in TFVC.)
Consider that you have mapped $/Foo/main to C:\Foo, and done a get latest. If you update your working folder mappings so that $/Foo/branches/feature now points to C:\Foo, then issue a get with Remap, then the server will download only the changed files between main and branches/feature, so it's an inexpensive way to update your local workspace to a feature branch.
(If you're looking for an example, this functionality exists in the command-line interface and in Team Explorer Everywhere but not in Visual Studio.)

TFS - Checkout restoring original modification dates on files?

I have used many version control systems and most of them restore the file's date/time on checkout. This is not the date/time it is checked out, or checked in, but the date on the actual file. TFS uses the date the file was checked out.
So, I'm trying to find out what is in production. The date of the file is 10/3/2014. I have an 8/3/14 check-in, and an 12/3/2014 check in, and 49 check-ins following that. The 8/3 does not match what is in production, clearly changes were made after that. So, I want to get the latest version of each file that was before 10/3/14 on it's modification time (check in date is as always, useless)
Now, in a "normal" company, there would be a version label applied when it was built and pushed to production - but we are working with off shore (India) developers who don't do that sort of thing. It appears that most of the 49 changes didn't make it to production, and will be rolled back.
I ended up taking file by file and trying to get something that built, and seemed to match what was in Production as best I could - and spent days putting the project back together. (It seems developers copied files between them instead of putting them into TFS - so different people checked in different pieces of the puzzle - many versions didn't even build.)
In any event, I didn't see any way to query by real modification date. I get how pulling files down with the correct modification dates would result in a requirement of a build-all, or deleting the object file result of that source file (in order to force a build) - but it sure would be nice to be able to get files changed since a specific date/time.
If i understood your problem correctly, you can query history of projects with commandline tf history with version option set to your interesting date. https://msdn.microsoft.com/en-us/library/yxtbh4yh.aspx

How can I bind my VS 2003 / XP Mode Project to the appropriate Server folders location with TFS?

Somehow my project got its source control bindings mixed up, and I'm trying to bind the local files to the correct place on the server. I am trying first to unbind the project, but when I then try to set up the binding anew and "Add Solution to Source Control", I get, "A project PDAClient.csdproj that you are attempting to add to source control cannot be added because the item AppSettings.cs is already under source control at the selected location"
It apparently only chose AppSettings.cs as the problem file to complain about because it is the first one in alphabetical order. I surmise this because I temporarily removed it from the project, tried again, and it complained about the next file in alpha order in the same way.
To try to outfox TFS, I renamed "MSSCCPRJ.SCC" to "MSSCCPRJ.SCCHide" and also renamed "PDAClient.vssscc" to "PDAClient.vsssccHide" but it simply created a fresh "PDAClient.vssscc"
(PDAClient is the name of the solution and the project)
If I try from VS 2003 File > Source Control > Change Source Control, I see this:
If I then select Bind for the solution, and then the eponymous project, I see:
If I hit "Browse" or the ellipsis button in the Server Binding column, it just "flashes" but opens no dialog for me to make the connection.
So the solution's binding is "invalid" but the project's binding is supposedly valid...
If I then select "OK" I get this:
...which looks promising ("Yes! Fix the bindings!") but selecting the "Fix" button simply takes me back to the Change Source Control dialog without having done anything. So I finally, reluctantly, select the other option, to "continue with the existing bindings" and see:
Okay...it tells me I have to check in a project for that to work, and I try to proceed, but see:
Note that it is trying to connect me to Handheld/Development/Development/HHS, but that's not what I want and need. DEV is a different branch; this is the Release branch. You can see that in the screamshot above in the solutions Path property (set to C:\Project\sscs\Handheld\Release (etc.)) not ...Development...(etc.) I compared the two using the built-in tool and saw that, indeed, the Server version was from the Dev branch (not the desired Release branch) and took the local version. But then I got:
As I then saw that some of the project's files were checked out, I was hoping against hope that perhaps it was now going to work. I tested it by making a change to a method name, but ended up seeing this, "An error or user cancellation occurred during checkout. Some files may not have been checked out. (File was not checked out.)" and then that was followed up with, "Could not perform refactoring because some of affected files could not be made writeable."...and so my change was backed out for me automatically.
Obviously, this isn't going to work, because I do need to make changes to this project.
Flailing about with what's left to me on the File > Source Control menu, I selected "Add Project From Source Control..." to see what it might offer. It first gives me a dialog where I connect to a TFS; I did. I navigated to the right spot on the server, and this looks good and ready to go:
Selecting OK invokes a dialog that tells me, "The local folder you chose to store your solution contains one or more solution files that have the same name as those in the source control server folder." with Overwrite, Cancel, and Help buttons.
I select Overwrite. I am then presented with a dialog:
I select PDAClient.sln (HHS was the former name of the solution/project)
However, when I subsequently select the Open button, I get, "The folder 'C:\Project\sscs\Handheld\Releases\6-4-0\HHS' cannot be used for the solution or project because it is already in use to store part of another solution or project."
I have no choice but to select "OK" which negates the whole process.
As a final head-first, possible-collar-bone-breaking feat of Any-Port-in-a-Stormism Syndrome, I select File > Source Control > Team Foundation Server MSSCCI Provider. This invokes the Kafka-esque Windows 2010 Shell inside of VS 2003 inside of XP Mode. According to what I see there, my setup is correct: The Server's copies of the Release project are bound to the local files Release folders:
But \Releases\HHS is grayed out, indicating there is no connection between the server folders and the local folders. And note that most (not all, but most) of the files in the Releases setup are actually stored locally in the Development folders! There are some key files that are bound correctly:
All the (dozens of) unseen files (only the first and last are seen in the last two screenshots) are tied to Development, too.
Although I don't have a "bind" type of context menu item for \Releases\HHS, there is a "map local"; although it is already ostensibly mapped correctly, I try it out, but get "The local folder could not be set to C:\Project\sscs\Handheld\Releases\6-4-0\HHS because it is already the local folder for another server folder."
So I go up to \Development\HHS, which does have a "valid" binding; note, again, that it is bound to the wrong local path (Releases instead of Dev).
So for it I first select the contextual "Remove Mapping" menu item. This affords me the opportunity to "Edit or remove a workspace mapping." I change the local folder from Releases to Dev. It looks good; Dev is now bound to Dev, and the binding is still seen as valid; this time it really is (I hope, anyway).
I now turn my attention back to Releases, but the context item "map local" is no longer there...and, although it shows the right connection between Server location and local, it is still grayed out...???
Note: The "Pending Changes" list of files is identical with both \Development\HHS and \Releases\HHS highlighted: the same three files in both cases are shown as being in the local Releases folder, and all the others in the local Dev folder.
Back in VS 2003 (out of the VS 2010 Shell running the TFS MSSCCI Provider), I go to "Change Source Control" and see that both the solution and the project have a Status of "Valid" now...when I select "OK" though, it tells me many of the files do not match and to either contact the administrator or perhaps a Get All will solve it. I tentatively look into a Select All, but see that it still says my project is bound to Development. ARGHHHH!!!!
Can anybody make sense out of this madness? How can I get the Release server folders pointed to the Release local folders, and Dev Server folders to the Dev local folders, without any bleedover and mismatching?
UPDATE
I looked in Source Control Explorer (TFS MSSCCI) again this morning, and my Dev\HHS had again gone back to being set to the wrong local path (Releases) and is connected (I guess that's what the glyph of the facing-each-other vertical arrows to the left of the folder indicates).
As to Releases\HHS, it was not connected (no glyph), but I was able to right click and map to a new folder I set up.
Here's what I see now (after changing the mapping of DEV from the local Releases folder back to the local DEV folder AGAIN!).
Properties for Dev HHS:
Properties for Release HHS:
I don't know if this makes sense to you, but it looks fishy to me.
UPDATE 2
The madness continues unabated today. My solution claims to have two pending checkins:
When I select "Check In," I get a confirmation dialog; I continue with the "Check In" button there. Then I get the "Check In - Source Files" dialog. I select the "Check In" button there, too. But then I see, "Files not checked out"
If I repeat the operations above, the last message is:
No Changess to Check In
All of the changes where either unmodified files or locks. The changes have been undone by the server."
???
IMO, I would have saved a lot of time by just zipping up files when I wanted to save the latest changes, rather than use this irksome beast; I spend more time fiddling with "productivity" tools than just using a more straightforward approach. Give me zip files and a good diff util over this cauldron of dashed hopes and clever-clever dirty tricks!
UPDATE 3
And if I close the project and re-open it, I see the following three times in a row:
So who in blue blazes told you to find such a server?!?!
Then I get:
And finally this again:
Argggggghhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!!!!!!
UPDATE 4
Even though the path for the solution and project are right (Releases), this is what the files in the project show:
The branches tab, as shown in Update, show Dev going down to Release; I don't know if that's right or not, because Release was a branch of Dev,
or...???
Anyway, I see the above from File > Source Control > Team Foundation Properties
HOWEVER, when I choose File > Source Control > Team Foundation Server MSSCCI Provider, the binding seems to be correct - the HHS Dev project has Dev as its local folder location, and the HHS Release project has the Release folders as its local location.
I don't know who is more confused: me, anybody who happens to read this, or TFS/MSSCCI itself. This kind of thing is, ironically, a real productivity killer.

timestamp when Getting Latest from TFS and does it matter?

I'm not sure why I never noticed this before but when I "Get Latest" from TFS, the date and time on the files in my local working folder are set to the current date and time. This applies to the Created and Modified dates, even if no changes have been made (as I just did "Get Latest", nothing more).
Should I be concerned about the dates and times of the files not reflecting the true date and time the file was created and subsequently modified? I have the revision history in TFS so I'm not overly concerned but I gotta admit this feels wrong. Everything technically works but I want to know what's going on.
As you note, the default behavior in Team Foundation Server is to write file times to the "current" time (when you retrieved the file.) This is the default behavior of most version control tools and generally considered safe.
Setting time to the remote time can have negative consequences in many scenarios. For example, make will scan for files newer than the last build time. Setting file times to the server's time can impact the ability to determine which files have changed since the last build.
However, if you do prefer this behavior and are using at least TFS 2012 and Visual Studio 2012, you can enable it on a per-Workspace basis by setting "File Time" to "Checkin":
Additional details from Microsoft:
File Time:
Choose Checkin if you want the date and time stamp of each file to generally match the stamp of the changeset of the version in your
workspace. A few issues and exceptions are:
When you modify the local file, the date and time stamp will match the date and time when you modified the file.
This feature is available only if you are using Visual Studio 2012 or later and Visual Studio Team Foundation Server 2012 or later.
The setting does not apply to folders, unless there is a pending add or delete operation to a file contained by the folder.
You might not be able to build your code project incrementally. Instead, you will have to rebuild).
Choose Current if you want the date and time stamp to match the date and time when you last modified the local file. For example, a
team member checked in the latest change to the file on Monday. On
Tuesday, you perform a get operation to update the file. The date and
time stamp is set to Tuesday.
As mentioned, that is the default behavior of TFS. It's the fist version control system I've used where that is the default setting. The problem with using current time for files when a developer gets latest, is that you can only tell if you have the latest version by doing a file compare on each file. Three different developers on the same project will have 3 different date time values for the same version of a file. Either way, always do a project clean before creating builds. Why? Because you might have tweaked a file or two, then after testing, reverted to the latest checked-in version. In my experience it's always better to use the checked-in time.
TFS should not modify original File attributes in Source Control processing. Its build features should use their own properties to control latest checked in versions and for build control.
Getting files from TFS should place the original file back down on a system with their original properties unmodified. TFS is broken by hijacking the original file's properties for its own purposes. The original Microsoft VSS tool provided this option - shame on the TFS team.

Why doesn't TFS get latest get the latest?

Why Why WHY doesn't TFS's get latest work consistently?
You would have thought that feature would have been tested thoroughly.
What I have to do is, get specific version, then check both overwrite writetable files + overwrite all files.
Is my local setup messed up or you do this also?
TFS redefined what "Get Latest" does. In TFS terms, Get Latest means get the latest version of the files, but ignore the ones that the server thinks is already in your workspace. Which to me and just about everyone else on the planet is wrong.
See this link: http://blogs.microsoft.co.il/blogs/srlteam/archive/2009/04/13/how-get-latest-version-really-works.aspx
The only way to get it to do what you want is to Get Specific Version, then check both of the "Overwrite ..." boxes.
Sometimes Get specific version even checking both checkboxes won't get you the latest file. You've probably made a change to a file, and want to undo those changes by re-getting the latest version. Well... that's what Undo pending changes is for and not the purpose of Get specific version.
If in doubt:
undo pending check in on the file(s)
do a compare afterwards to make sure your file matches the expected version
run a recursive 'compare' on your whole project afterwards to see what else is different
keep an eye on pending changes window and sometimes you may need to check 'take server version' to resolve an incompatible pending change
And this one's my favorite that I just discovered :
keep an eye out in the the Output window for messages such as this :
Warning - Unable to refresh R:\TFS-PROJECTS\www.example.com\ExampleMVC\Example MVC\Example MVC.csproj because you have a pending edit.
This critical message appears in the output window. No other notifications!
Nothing in pending changes and no other dialog message telling you that the file you just requested explicitly was not retrieved! And yes - you resolve this by just running Undo pending changes and getting the file.
TFS, like some other source control providers, such as Perforce, do this, as the system knows what the last version you successfully got was, so get latest turns into "get changes since x". If you play by its rules and actually check things out before editing them, you don't confuse matters, and "get latest" really does as it says.
As you've seen, you can force it to reassess everything, which has a much greater bandwidth usage, but behaves closer to how SourceSafe used to.
It's hard to respond to a statement without examples of how it's not working, but it's crucial to understand that TFVC (in "Server Workspace" mode, which was the mechanism prior to TFS 2012) does not examine the state of your local filesystem. TFVC Server Workspaces are a "checkout-edit-checkin" type of system where this is by-design, an intentional decision made to massively reduce the amount of file I/O required to determine the state of your workspace. Instead, the workspace information is saved on the server.
This allows TFVC Server Workspaces to scale to very large codebases very efficiently. If you are in a multi-gigabyte code base (like Visual Studio or the Windows source tree) then your client does not need to scan your local filesystem, looking for files that may have changed, because the contract you have with TFS is that you will explicitly check a file out when you want to edit it.
You are expected to not mark a file as write-only and change it without explicitly checking it out first. If you go down this route, then the server does not know that you have made changes to your file, and performing a "Get Latest" operation will not update your local workspace, because you haven't told the server that you've made changes.
If you do subvert this mechanism then you can use the tfpt reconcile command to examine your local workspace for changes that you have made locally.
If you find yourself using "Get Specific Version" and selecting the "force" and "overwrite" options, then it is very likely that you are in the habit of bypassing all of the enforcements that TFS has implemented to keep you from hurting yourself, and you should probably consider TFVC Local Workspaces.
TFVC Local Workspaces provide an "edit-merge-commit" type of version control system, which means that you do not need to explicitly check files out before editing them and they are not read-only on-disk. Instead, you simply need to edit the file, and your client will scan the filesystem, notice the change, and present this as a pending change.
TFVC Local Workspaces are recommended for small projects that do not require fine-grained permissions control, since they present a much nicer workflow. You are not required to be online, and you do not have to explicitly check files out before editing them.
TFVC Local Workspaces are the default in TFS 2012, and if they are not enabled for you, then you should ask your server administrator. (Organizations with very large codebases or strict auditing requirements may disable TFVC Local Workspaces.)
Eric Sink's excellent book Version Control By Example outlines the differences between checkout-edit-checkin and edit-merge-commit systems and when one is more appropriate than the other.
The Professional Team Foundation Server 2013 book also provides excellent information about the differences between TFVC Server Workspaces and TFVC Local Workspaces. The MSDN documentation and blogs also provide detailed information:
Decide between using a local or a server workspace
Server workspaces vs. local workspaces
Team Foundation Server – Trying to understand Server versus Local Workspaces
Team Foundation Server (TFS) keeps track of its local copy in a hidden directory called $TF.When you issue the "get Latest Version", TFS looks into this folder and see weather I have the latest copy or not. If it does it will not download the latest copy. It does not matter if you have the original file or not. In fact you might have deleted the entire folder (as in my case) and TFS won't fetch the latest copy because it does not look into the actual file but the hidden directory where it records changes. The flaw with this design is, anything done outside the system will not be recorded in TFS. For example, you may go into Windows explorer, delete a folder or file and TFS wont recognize it. It will be totally blind. At least I would expect there Windows would not let you delete this file but it does!
One way to enforce the latest copy is to delete the hidden $TF folder manually. To do that, go to command prompt and navigate to the root folder where you project was checked out and issue this command
rd/s $tf // remove $TF folder and everything inside it
If you want to just check the hidden folder, you can do it using
dir /ah // display hidden files and folders
Note: If you do it, the tf will think you do not have any local copy even though you have it in files and it will sync up everything again.
Caution: Use this method at your own risk. Please do not use it on critical work.
"Get latest version" by default will only download the files that have changed on the server since the last time you ran "Get latest version". TFS keeps track of the files you download so it doesn't spend time downloading the same version of the files again. If you are modifying the files outside of Visual Studio, this can cause the consistency problems it sounds like you are seeing.
Unfortunately, there has to be one or more bugs in TFS 2008, since this problem regularly crop up on developer machines and build servers where I work as well.
I can do Get Latest, I can see in the history list of the project that there have been commits after I last did a Get Latest, I have not touched the files on disk in any way, but after the "Get Latest" function has completed, when I check the TFS tab, some of the files still says that they're not the latest version.
Obviously TFS is able to determine that I have old files locally, since the list says so. Yet, Get Latest fails to do that, get the latest version. If I do what you did, use the Get Specific version, and check the two checkboxes at the bottom of the dialog, then the files are retrieved.
We changed our build servers to always use the Get Specific version type of function instead, so this part now works, but since our build server (TeamCity) also relies on checking if there have been changes to the files in order to kick off a build, sometimes it lapses into a "nothing changed, nothing to see here, move along" mode and does nothing until we forcibly run the build configuration.
Note that I have experienced this problem on a machine that is never touched, except for get latest + build, both manually, so there's nothing tampering with the files. It's just TFS getting confused.
One time this cropped up I verified that the files on disk was indeed binary identical to the version previously retrieved, so no manual tampering had been done with the files.
Also, I fail to see how TFS can "know" whether files have changed on disk or not without actually looking at the contents. If one part of TFS can see that the files are indeed not the latest version, then the Get Latest version should absolutely be able to get the latest version. This in reference to comments to other answers here.
It might because you are login TFS as the same user, and the workspace name (based on machine name by default) is also the same, so TFS thinks your are on the same machine and same workspace, thus you already have the latest version of the files, so it wont get them for you.
try rename your machine, and create a new workspace as a new machine.
Go with right click: Advanced > Get Specific Version. Select "Letest Version" and now, important, mark two checks:
The checks are:
Overwrite writeable files that are not checked
Overwrite all files even if the local version matches the specified version
WHen I run into this problem with it not getting latest and version mismatches I first do a "Get Specific Version" set it to changeset and put in 1. This will then remove all the files from your local workspace (for that project, folder, file, etc) and it will also have TFS update so that it knows you now have NO VERSION DOWNLOADED. You can then do a "Get Latest" and viola, you will actually have the latest
I had the same issue with Visual Studio 2012. No matter what I did, it didn't get the code from TFS source control.
In my case, the cause was mappings a folder + subfolder from the source control separately but to the same tree in my local HD.
The solution was removing the subfolder mapping using the "manage workspaces" window.
Most of the issues I've seen with developers complaining that Get Latest doesn't do what they expect stem from the fact that they're performing a Get Latest from Solution Explorer rather than from Source Control Explorer. Solution Explorer only gets the files that are part of the solution and ignores anything that may be required by files within the solution, and therefore part of source control, whereas Source Control explorer compares your local workspace against the repository on the server to determine which files are needed.
It could happen when you use TFS from two different machines with the same account, if so you should compare to see changed files and check out them then get latest then undo pending changes to remove checkout
This worked for me:
1. Exit Visual Studio
2. Open a command window and navigate to the folder: "%localappdata%\Local\Microsoft\Team Foundation\"
3. Navigate to the sub folders for every version and delete the sub folder "cache" and its contents
4. Restart Visual Studio and connect to TFS.
5. Test the Get Latest Version.
In my case, Get specific version, even checking both check boxes and undoing all pending changes didn't work.
Checked the work spaces. Edit current workspace. Check all paths.
The solution path was incorrect and was pointing to a deleted folder.
Fixed the path and get latest worked fine.
Every time this happens to me (so far) is because I have local edits pending on the .csproj project file. That file seems to keep a list of all the files included in the project. Any new files added by somebody else are "not downloaded" because they are not in my locally edited (now stale) project file. To get all the files I first have to undo pending changes to the .csproj file first then "get all". I do not have to undo other changes I have made, but I may have to go back and include my new files again (and then the next guy gets the same problem when he tries to "get all"...)
It seems to me there is some fundamental kludginess when multiple people are adding new files at the same time.
(this is in .Net Framework projects, maybe the other frameworks like Core behave differently)
just want to add TFS MSBuild does not support special characters on folders i.e. "#"
i had experienced in the past where one of our project folders named as External#Project1
we created a TFS Build definition to run a custom msbuild file then the workspace folder is not getting any contents at the External#Project1 folder during workspace get latest. It seems that tfs get is failing but does not show any error.
after some trial and error and renaming the folder to _Project1. voila we got files on the the folder (_Project1).
Tool:
TFS Power Tools
Source:
http://dennymichael.net/2013/03/19/tfs-scorch/
Command:
tfpt scorch /recursive /deletes C:\LocationOfWorkspaceOrFolder
This will bring up a dialog box that will ask you to Delete or Download a list of files. Select or Unselect the files accordingly and press ok. Appearance in Grid (CheckBox, FileName, FileAction, FilePath)
Cause:
TFS will only compare against items in the workspace. If alterations were made outside of the workspace TFS will be unaware of them.
Hopefully someone finds this useful. I found this post after deleting a handful of folders in varying locations. Not remembering which folders I deleted excluded the usual Force Get/Replace option I would have used.
I encountered the same problem:
My development server was corrupted and restored, but the information restored was from a few days ago.
TFS was updated that all the files are up to date, but in practice my files were correct a few days ago!
Nothing I did helped. get latest did not get the latest version.
At the end I got specific varision from a month ago. my files were updated accordingly, and then I did get latest.
And it worked. the files have been updated.

Resources