In TFS, how do I see the history of syncs to a workspace? I want to see when I sync'd and which files were changed when the sync occurred.
A:
In general: you can't. Sync history is not stored anywhere.
That said...depending on exactly what you what to know, and what assumptions you're willing to make, there's probably a way...
What changeset is my workspace sync'd up thru? Assumption: you always Get to a consistent snapshot in time, not a label nor a partial Get on some subfolder. Answer:
Get-TfsItemHistory $/ -r -version W -stop 1
Which files were updated during the last sync? Assumption: your last sync took <1min to download. Answer:
$files = dir -r | sort lastwritetime -desc;
$files |
? { $files[0].lastwritetime - $_.lastwritetime -lt [timespan]::TicksPerMinute } |
select fullname, lastwritetime
(these are Powershell, BTW -- substitute your script language of choice)
Richard Berg
2010-01-29 20:26:15