title: TF.EXE history is off by one if the changeset only contains deletions
body: <p>I want to get the current changeset id in my workspace. This problem is solved in "<a href="https://stackoverflow.com/questions/7748039/get-current-changeset-id-on-workspace-for-tfs">Get current changeset id on workspace for TFS</a>". </p>
  
  <pre><code>tf history . /r /noprompt /stopafter:1 /version:W
  </code></pre>
  
  <p>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.</p>
  
  <p>The same thing happens when I use the TFS API calls that are mentioned on <a href="http://blogs.msdn.com/b/buckh/archive/2009/01/26/how-to-determine-the-latest-changeset-in-your-workspace.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/b/buckh/archive/2009/01/26/how-to-determine-the-latest-changeset-in-your-workspace.aspx</a></p>
  
  <p>Is this a bug in TFS? Does anyone have a solution?</p>
  
  <p>Thanks in advance.</p>