TFS Changeset history using QueryHistory after branch rename
I'm using the VersionControlServer.QueryHistory method to retrieve a list of files that have changed during a timespan that ranges from 5/1/2009 to 10/1/2009. My results unexpectedly only included items that had changed after 9/1/2009. I then realized that the path that I was using, $/Project/Report开发者_运维知识库s/Main, didn't exist until 9/1/2009. Before 9/1/2009, there had been another node named $/Project/Main/Reports, which was renamed to $/Project/Reports/Main.
When I query from Source Control Explorer I can see the entire history (5/1/2009 - 10/1/2009) that I expect to see. However, I can't get the same results via the API. I've tried to specify the branch that no longer exists because it was renamed, but not surprisingly I get zero results. Any ideas?
I believe you need to pass the slotMode
parameter as false
; that instructs TFS that you want the history for the item that currently occupies that slot, even if it did not always do so (passing it as true gives you the history of that slot).
See the docs for more information.
精彩评论