How to check files with TFS without getting the latest?

When reconciling the old solution, I get historical files from TFS without checking.
That is, for the heap of files in my solution, I made "Show History"> "Get This Version"

Now I have all the combinations and coincidences of the historical versions that I want, but I did not track which files (and which file versions) I have that were not the last.

Is there a way to get a list of "not the most recent" files in my solution? That is, I want a list of output windows of replaced files , if I had to do "get the last", but I do n't really want to get them.

+6
source share
3 answers

Right-click on the top-level folder in the source control explorer, select Compare. The top parameter should be the server path, for example. $/TeamProject/Myfolder with the latest version selected in the drop-down list. The bottom option should be c:\MyWorkspace\TeamProject\Myfolder , this will compare with the latest version stored in TFS, with files that you locally. Diff screen 1Diff screen 2

Or you can do the same using the tf diff command line tool.

+9
source

You can do a β€œpreview” from the command line: tf get /recursive /preview will list the files it will do to update you to the latest version.

+6
source

If you are familiar with Powershell, you should take this approach:

  • Make sure Power Tools Team Foundation is installed.
  • You may need to restart the installer because the TF Powershell cmdlets are not installed by default.
  • Open powershell in x86 mode (x64 is weird with the specified cmdlets)
  • Add-PsSnapin Microsoft.TeamFoundation.Powershell
  • Go to your workspace.
  • Get-TfsItemProperty * -recurse | where {$ _. IsLatest -eq $ false} | Table format
  • If necessary, add "> staleList.txt" to transfer the output to a file.

Hope it works!

+3
source

Source: https://habr.com/ru/post/887458/


All Articles