title: Empty or non-existent '/db/txn-current' in a Subversion repository
body: <p><em>I've encountered an issue with Apache Subversion repository and I'm looking for the <strong>best</strong> solution:</em></p>
  
  <p>I can't commit to a Subversion repository and I'm getting the error:</p>
  
  <blockquote>
    <p>svn: E720002: Commit failed (details follow): svn: E720002: Can't open
    file 'C:\Repositories\myproject\db\txn-current': The
    system cannot find the file specified.</p>
  </blockquote>
  
  <p>If I create an empty <code>txn-current</code> file if will get another error on commit:</p>
  
  <blockquote>
    <p>svn: E070014: Commit failed (details follow): svn: E070014: Can't read
    file 'C:\Repositories\myproject\db\txn-current': End
    of file found</p>
  </blockquote>
  
  <p><strong>NOTE:</strong> Let's imagine that I don't have a backup of a repository so I have to fix the issue manually.</p>
  
  <p>The same behavior has been already discussed on StackOverflow: <a href="https://stackoverflow.com/questions/4568043/svn-commit-problem-cannot-read-d-uc-db-txn-current-end-of-file-found">svn commit problem, Cannot read &#39;d:\UC\db\txn-current&#39;: End of file found</a>. However I doubt that answers there are really helpful: </p>
  
  <ul>
  <li><p>I don't think that creating the <code>\db\txn-current</code> manually and putting a <code>0</code> there (or any other integer) is a good solution. I suppose that it could result into some unexpected behavior in near future,</p></li>
  <li><p><code>svnadmin recover</code> and/or <code>svnadmin verify</code> do not create and/or populate <code>txn-current</code>. These commands are helpless in this case.</p></li>
  </ul>
  
  <p>According to the <a href="http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_fs_fs/structure" rel="nofollow noreferrer">FSFS description</a> <code>\db\txn-current</code> file contains the next transaction key number. If I put some integer to the file then I can commit and the integer will increase by 1.</p>
  
  <p>However looks like putting some irrelevant integer can break something in my repo and I don't want this to happen.</p>
  
  <blockquote>
    <p>The "txn-current" file is a file with a single line of text that
    contains only a base-36 number.  The current value will be used in the
    next transaction name, along with the revision number the transaction
    is based on.  This sequence number ensures that transaction names are
    not reused, even if the transaction is aborted and a new transaction
    based on the same revision is begun.  The only operation that FSFS
    performs on this file is "get and increment"; the "txn-current-lock"
    file is locked during this operation.</p>
  </blockquote>
  
  <p><strong>What should I do to fix the <code>\db\txn-current</code> issue properly? What integer should I put into the file? Is there any other way to solve this?</strong></p>
  
  <p><strong>EDIT:</strong> </p>
  
  <ul>
  <li>How can I solve the same issue (non-existent or empty) but for <code>db/current</code> file?</li>
  </ul>