title: Subversion repository layout for libraries developed across different programs
body: <p>I'm responsible for several (rather small) programs, which share a lot of code via different libraries. I'm wondering what the best repository layout is to develop the different prorgrams (and libraries), and keep the libraries in sync across all the programs.</p>
  
  <p>For the sake of argument let's say there are two programs with two libraries:</p>
  
  <ul>
  <li>Program1
  
  <ul>
  <li>Library1</li>
  <li>Library2</li>
  </ul></li>
  <li>Program2
  
  <ul>
  <li>Library1</li>
  <li>Library2</li>
  </ul></li>
  </ul>
  
  <p>Naturally, bug fixes and enhancements for the libraries should (eventually) merge to all programs. Since the libraries are being worked on while working on the different programs, using <a href="http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html" rel="noreferrer">externals definitions</a> seems out of the question.</p>
  
  <p>So I thought to treat my libraries at all but one place as <a href="http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html" rel="noreferrer">vendor branches</a> but I'm not sure what the best layout for this would be.</p>
  
  <p>I was thinking something along the lines of:</p>
  
  <ul>
  <li>Libraries
  
  <ul>
  <li>Library1 (ancestor)</li>
  <li>Library2 (ancestor)</li>
  </ul></li>
  <li>Program1
  
  <ul>
  <li>Program1 code</li>
  <li>Library1 (vendor branch)</li>
  <li>Library2 (vendor branch)</li>
  </ul></li>
  <li>...</li>
  </ul>
  
  <p>Then say when developing Program1 some changes are made for Library2, I merge them back to the Libraries part of the repository, and merge them from there to all other programs when desired. </p>
  
  <p>Merging to the other programs can't always happen immediately, the people working on Program2 could be close to a release and rather finish that first, create a tag, and only then update all libraries.</p>
  
  <p>I'm a bit concerned this will result in many merges and a bit of a maintenance headache after a while but I don't really see a much better solution.</p>
  
  <p>Then again, this seems a rather common use case to me, so I thought I'd just ask the stackoverflow community, what's the best repository layout to achieve this?</p>