Stepan Loginov
Stepan Loginov

Reputation: 1767

TFS get only sources

In my case get latest version of some branch means download 50GB of data. There is a lot of resources inside but I need only sources.

If it possible to download only one specific type instead of all data?

Update: I ask about simple way . If solution harder than installing VS plugin or couple lines in powershell/python using tf.exe then I will download 50GB once and try to code solution with TFS API on weekend.

Upvotes: 1

Views: 354

Answers (1)

Eduard
Eduard

Reputation: 917

As already mentioned by @Giulio Vian you can cloak the paths you don't want to download before downloading.

Unfortunately you cannot cloak using wildcards, but you can use script approach in How do I cloak multiple folders at a time in Team Foundation Server? to cloak unneeded files.

In the script example shown in that answer you just need to come up with PowerShell "where" filter matching your case

Get-ChildItem | where {$_.PsIsContainer} | ForEach-Object { Write-Host $_.Name ; tf workfold /cloak $_.Name }

the details in the question is not provided to code exact filter. If you update your questions I can update this with "where" filter.

Upvotes: 1

Related Questions