title: Setting Up SVN:Externals with TortoiseSVN in Windows
body: <p>I'm trying to set up <code>svn:externals</code> with TortoiseSVN on a Windows machine. I have two projects and both repositories have been already created on the same local machine.</p>
  
  <p>The current structure looks like this. I created <code>repoA</code>, <code>repoB</code> for repositories and <code>workA</code> and <code>workB</code> for working directories (checkouts).</p>
  
  <p><strong>Repositories</strong></p>
  
  <blockquote>
    <p>Z:\repos\repoA</p>
    
    <p>Z:\repos\repoB</p>
  </blockquote>
  
  <p><strong>Working Directories</strong></p>
  
  <blockquote>
    <p>Z:\Projects\workA\trunk\core.php</p>
    
    <p>Z:\Projects\workA\trunk\lib\lib01.php</p>
    
    <p>Z:\Projects\workB\trunk\core_mod.php</p>
    
    <p>Z:\Projects\workB\trunk\lib\</p>
  </blockquote>
  
  <p>(there are <code>tags</code> and <code>branches</code> folders but they are omitted to keep the question simple.)</p>
  
  <p>What I'd like to achieve is the file(s) under <code>workA\trunk\lib\</code> in this case <code>lib01.php</code> to be automatically copied into the <code>workB\trunk\lib\</code> directory.</p>
  
  <p>In order to set this up, what I've done is as follows: </p>
  
  <ol>
  <li>Checked out <code>workA</code> and assigned it to <code>repoA</code> and checked out <code>workB</code> and assigned it to <code>repoB</code></li>
  <li>Comitted the <code>workA\trunk</code> folder so the <code>repoA</code> is up to date.</li>
  <li>In oreder to assign an import location for <code>workB\trunk\lib</code>, right clicked on the <code>workB</code> folder and chose <code>TortoiseSVN -&gt; Properties</code>.</li>
  <li>Clicked on <code>New -&gt; Externals</code> and clicked <code>New...</code> </li>
  <li><p>typed <code>./trunk/lib</code> in the <code>Local path</code> form field. For the <code>URL</code> field, typed <code>file:///Z:/repos/repoA/trunk/lib</code>. By pressing the <code>...</code> button, repo-browser opened and helped to select the target folder.</p>
  
  <p><img src="https://i.stack.imgur.com/7gZ9f.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/2Tqlt.png" alt="enter image description here"></p></li>
  <li><p>Clicked <code>Ok</code> a few times to close the settings windows. I assumed the externals setting was done.</p></li>
  <li>Created a file, <code>Z:\Projects\workB\trunk\core_mod.php</code></li>
  <li>Right clicked on <code>Z:\Projects\workB\trunk\</code> and selected <code>SVN Comit</code> to comit the <code>workB</code> to <code>repoB</code>.</li>
  </ol>
  
  <p>I expected at this point, the lib01.php would be automatically imported in the <code>Z:\Projects\workB\trunk\lib</code> folder but nothing is copied. I also tried <code>SVN Update</code> by right clicking on the <code>workB\trunk</code> folder. But the <code>workB\trunk\lib</code> folder kept empty.</p>
  
  <p>I suspect the relative path <code>./trunk/lib</code> must be mistaken. I don't know. If you can point out what I'm doing wrong, it would be appreciated.</p>
  
  <p><strong>Update</strong></p>
  
  <blockquote>
    <p>6a - commit changed Working Copy WorkB to repo</p>
  </blockquote>
  
  <p>This was a blind spot for me. I right clicked on <code>Z:\Projects\workB</code> and selected <code>SVN Commit...</code> and it gave the following error. </p>
  
  <p><img src="https://i.stack.imgur.com/FKTGA.png" alt="enter image description here"></p>
  
  <p>After clicking the OK button immediately I got a dialog window asking whether to update the folder and I clicked OK. Then TortoiseSVN started updating <code>Z:\Projects\workB</code> and I got this error. But after this, when I re-commited <code>Z:\Projects\workB</code>, it went through without an error.</p>
  
  <p><img src="https://i.stack.imgur.com/wfs1z.png" alt="enter image description here"></p>
  
  <blockquote>
    <p>("trunk/lib" in your case will be more bulletproof, I suppose).</p>
  </blockquote>
  
  <p>Thanks, when I reselected <code>Property</code> of the <code>workB</code> folder and clicked on the <code>Edit</code> button for the <code>svn:externals</code>, TortoiseSVN automatically adjusted <code>./trunk/lib</code> to <code>trunk/lib</code>. Now it is set to be so.</p>
  
  <blockquote>
    <p>6b - test with repobrowser on RepoB (just fastest way), that definition is correct</p>
  </blockquote>
  
  <p>I right clicked on <code>Z:\repos\repoB</code> and chose <code>TortoiseSVN -&gt; repo-browser</code> and browsed down to the trunk folder. It looks as follows. Does it look right? I really don't know since I never had worked on this task. The lib folder under the trunk folder is empty in the repo-browser.</p>
  
  <p><img src="https://i.stack.imgur.com/Lj5kg.png" alt="enter image description here"></p>
  
  <p>The <code>Z:\Projects\workB\trunk\lib</code> folder is still empty. The error message suggests to relocate 'Z:\Projects\workB' but I'm not sure what it means.</p>