1

I have the following local folder structure:

Top-Level Checkout
|-Project1
|    -Project Specific Files
|
|-Project2
|    -Project Specific Files

For which I want to add a svn:externals property to the Project1 for some .dll files that live in my repository.

I use TortoiseSVN to set the property (if it matters, I don't think it does). I'm attempting to add the svn:externals definition on the Project1 folder so that my .dll files are downloaded to that folder, forming the following structure

Top-Level Checkout
|-Project1
|    -Project Specific Files
|    -.dll1
|    -.dll2
|    -.dll3
|    -.dll4
|
|-Project2
|    -Project Specific Files

But the externals property refuses to let me specify that I want to download them to the folder I am currently setting the externals property on.

For example, if my property looks like this:

^/Some/Repository/Url "SomeFolder"

It will create SomeFolder under Project1 and put the .dlls there.

If I do this

^/Some/Repository/Url ""

It complains it's invalid. This:

^/Some/Repository/Url "\"

Will allow me to save it, but then when I try to update and get my externals, it breaks with

Can't make directory 'Top Level Checkout\Project1\': The filename, directory name, or volume label syntax is incorrect.

How can I tell it to download the .dlls to the local folder that I'm setting the externals to without it wanting to create a subfolder every time?

Lastly, I haven't tried setting the externals property on Top-level Checkout, partially because I think it will still tell me it can't create the directory, but mostly because that is not a viable solution for this project.

Anyone know how to do this?

bahrep
  • 29,961
  • 12
  • 103
  • 150
Brandon
  • 4,491
  • 6
  • 38
  • 59
  • If you don't want to tinker with advanced features of NTFS and want to use only what SVN has to offer then you must either bring the complete directory (which you say you don't want), or each file separately (as per Ben's answer). – Dialecticus May 09 '14 at 00:06

2 Answers2

2

IF these DLL files reside in the same repository, you can specify the full name of each file rather than a directory in which to place them. This is called a "file external".

So your rule would look like:

^/Some/Repository/URL/file1.dll file1.dll
^/Some/Repository/URL/file2.dll file2.dll
# ...
# etc.
Ben
  • 8,725
  • 1
  • 30
  • 48
0

I forgot to add comments and stuff to this question.

I read some in depth stuff on the svn:externals documentation and found that it must create a sub-folder. That's ridiculous limitation to have IMO, but it is what it is.

I ended up putting the external on the top-level folder in this case. It hasn't broken anything to my knowledge, but I also haven't worked on that particular project in a while now. The other devs haven't complained.

Also, I'm leaving this question unanswered because there is no solution to the problem yet.

Brandon
  • 4,491
  • 6
  • 38
  • 59
  • That's outdated information, then. You can do externals file-by-file using file externals. Directory externals must create a subdirectory, because a directory external basically creates a brand new independent working copy. This is also similar to how Subrepositories work in systems like Mercurial and Git. – Ben Jun 27 '14 at 13:46
  • I didn't want to specify each file separately. That would require me to make a change to the external every time a new file is added. – Brandon Jun 27 '14 at 14:58
  • You should be doing that anyway, unless you are ignoring the strong advice from the SVN documentation, telling you to use explicit revision numbers in your externals. – Ben Jun 27 '14 at 15:37