1
votes

I'm trying to set up a svn externals on my local Windows machine with TortoiseSVN. I created a working directory by selecting SVN Checkout. It contains a directory named lib whose contents should be imported from an external location. I followed this tutorial and this but still am having hard time setting it up.

The current structure looks like this:

/myproject/trunk/core.php

/myproject/trunk/lib/

/myanotherproject/trunk/core.php

/myanotherproject/trunk/lib/lib01.php

I'd like to make it automatically import the lib files of myproject from the myanotherproject directory. The myanotherproject directory is not a repository. It is also a working directory of another project.

What I did:

  1. Right Clicked on he myproject/trunk/lib folder and chose TortoiseSVN -> Properties
  2. Selected New -> Externals
  3. Clicked on the New button and in the URL field typed, file:///Z:/myanotherproject/trunk/lib
  4. Clicked OK

Then I got the error:

Error parsing svn:externals property on 'Z:\myproject\trunk\lib': 'file:///Z:/myanotherproject/trunk/lib'

So does the import source have to be a repository since the URL has to be specified? Thanks for your information.

2

2 Answers

1
votes

You can't specify a working copy as the source for svn:externals and I don't really understand why you need that.

svn:externals has to point to a repository location; you can point to a different repository BTW. In some cases you may want to specify a revision number of the svn:externals source.

I advise you to check the svn:externals reference in the SVNBook. The first two sentences answer your question:

Sometimes it is useful to construct a working copy that is made out of a number of different checkouts. For example, you may want different subdirectories to come from different locations in a repository or perhaps from different repositories altogether.

Please also check the TortoiseSVN manual on this topic.

2
votes

Follow-up to @bahrep

External must use Repo-path URL, not WC-URL, because from WC of "superproject" you'll be able

  • checkout
  • update
  • and even commit

with the externals, which is impossible for Working Copy, only for repository