开发者

TFS Sync history

开发者 https://www.devze.com 2022-12-18 07:05 出处:网络
In TFS, how do I see the history of syncs to a workspace? I want to see when I sync\'d开发者_Python百科 and which files were changed when the sync occurred.In general: you can\'t.Sync history is not s

In TFS, how do I see the history of syncs to a workspace? I want to see when I sync'd开发者_Python百科 and which files were changed when the sync occurred.


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消