title: Using SVN post-commit hook to update only files that have been committed
body: <p>I am using an SVN repository for my web development work.  I have a development site set up which holds a checkout of the repository.</p>
  
  <p>I have set up an SVN post-commit hook so that whenever a commit is made to the repository the development site is updated:  </p>
  
  <pre><code>cd /home/www/dev_ssl
  /usr/bin/svn up
  </code></pre>
  
  <p>This works fine but due to the size of the repository the updates take a long time (approx. 3 minutes) which is rather frustrating when making regular commits.  What I'd like is to change the post-commit hook to only update those files/directories that have been committed but I don't know how to go about doing this.  Updating the "lowest common directory" would probably be the best solution, e.g.</p>
  
  <p>If committing the follow files:</p>
  
  <ul>
  <li>/branches/feature_x/images/logo.jpg</li>
  <li>/branches/feature_x/css/screen.css</li>
  </ul>
  
  <p>It would update the directory: /branches/feature_x/</p>
  
  <p>Can anyone help me create a solution that achieves this?</p>
  
  <p><strong>Update</strong>: </p>
  
  <ul>
  <li>The repository and development site are located on the same server so network issues shouldn't be involved.</li>
  <li>CPU usage is very low, and I/O should be ok (it's running on hi-spec dedicated server)</li>
  <li>The development site is approx. 7.5GB in size and contains approx. 600,000 items, this is mainly due to having multiple branches/tags</li>
  </ul>