I want to get the current changeset id in my workspace. This problem is solved in "Get current changeset id on workspace for TFS".
tf history . /r /noprompt /stopafter:1 /version:W
This works in almost all cases. However, this fails if the current changeset contains ONLY deletes from TFS. This is not necessarily changesetId - 1, but depends on the history of the file / folder I query. If the current changeset only deleted a few files, the changeset prio to the current changeset in the history of the file / folder that I query.
The same thing happens when I use the TFS API calls that are mentioned on http://blogs.msdn.com/b/buckh/archive/2009/01/26/how-to-determine-the-latest-changeset-in-your-workspace.aspx
Is this a bug in TFS? Does anyone have a solution?
Thanks in advance.