title: SVN: find files updated to nonexistence
body: <p>I am writing a shell script which can store the actual state of a SVN working copy and restore it later, exactly as it was. Currently I have a problem with specific, rare combination of revisions of files and directories which seems to be undetectable.</p>
  
  <p>Let's say that there is a repository with two revisions.
  There are two cases:</p>
  
  <ol>
  <li><p>Assume that <code>foo</code> is a file (or a directory) that exists only in revision 2. At the beginning the whole working copy is at revision 2. Then <code>foo</code> (and only <code>foo</code>) is updated to revision 1.</p></li>
  <li><p>Assume that <code>bar</code> is a file (or a directory) that exists only in revision 1. At the beginning the whole working copy is at revision 1. Then <code>bar</code> (and only <code>bar</code>) is updated to revision 2.</p></li>
  </ol>
  
  <p>The both cases are very similar but it seems that they have different solutions. In both cases the file (or directory) simply vanishes. However, output of command <code>svn status</code> contains no information about that.</p>
  
  <p>How to create by a shell script a list of such files and directories?</p>
  
  <hr>
  
  <p>There is one simple but bad solution. It is possible to use command <code>svn list</code> to get a list of files that should exist in current revision and compare it to the list of files that really exist.</p>
  
  <p>This solution is unacceptable because it takes a lot of time and generates a big traffic to the server.</p>
  
  <hr>
  
  <p>I posted the best answer that I can come up with. Still, it works only for the first case and has false-positives.</p>