views:

437

answers:

4

I'm trying to set up a sort of symbolic link in our subversion repository with svn:externals, but it's not really working all that well. What I want to do is link a folder in one part of the same repository to another, like so:

src/somewhere_else/schema https://svn.acme.com/svn/project/trunk/src/schema

This works fine for truly external resources (ie, directories in a different repo), but I can't get it to work for resources within the same repo like above. I've googled this for a while and it seems like this should be supported, what am I missing?

We're using Subversion 1.5.5 under VisualSVN on a Windows 2003 server installation.


EDIT:

I forgot to mention that I don't get any errors, the folder that should get it's content from the other folder just stays empty.

+3  A: 

Subversion 1.5 added relative externals.

Roger Lipscombe
+2  A: 

I don't think if this is your real problem, but I define the properties directly on the folder. In your case, I create a src\somewhere_else folder and add the property:

schema https://svn.acme.com/svn/project/trunk/src/schema

Just a little thing to remember, if you define absolute external url like you propose to do:

src/somewhere_else/schema https://svn.acme.com/svn/project/trunk/src/schema

they will not automatically change if you create a TAG or BRANCH. Meaning that one part of a TAG (the external url) will always point to the TRUNK of your schema.

It's of course fine if the schema don't change too much but may be a problem further down the road when you have a 2 year old application to patch and the schema has been widely changed.

Vladimir
Very nice comment about the paths, thanks!
macke
+1  A: 

The syntax you give:

working-copy-relative-path    full-repo-url

Should work just fine. But, if you go this route, you do have to give the full URL as you would use it if you were checking out, even if the link is within the same repository. You are doing that, right?

The alternative, introduced with 1.5 are relative externals:

repo-url-or-relative-path working-copy-relative-path

See Roger Lipscombe's link for more info.

Still, what you are describing should work. If it isn't working then you must not be describing what you are actually doing accurately enough. Some detail is still missing.

bendin
+2  A: 

Try doing a "Update to specific revision", and specify "Fully recursive". If your working copy is stuck on "Working copy only", it won't get externals contents.

Lasse V. Karlsen
This seems to have done the trick, thanks!
macke