0
votes

I've set up a repository on my local Windows7 computer, with the following structure:

enter image description here

enter image description here

I want to set up my repository so the files in common->trunk are included in project1->trunk.

My understanding of externals is that when I check out project1 with externals the file somethingforeveryone.php shows up in the project1->trunk directory.

I've read several posts and the svn documentation regarding the inclusion of externals. I'm still unclear how to set up the reference to common files. Local path and URL what are they supposed to be? Is this the correct place to define them? I've made several attempts to define these but get error message "Error parsing svn:externals".

enter image description here

Thanks for any suggestions.

============

I was able to create the external definition as you suggest and then I committed the changes to the repository. Checking out a new project, I discover the entire repository is copied to the trunk when all I wanted were the files withing common/trunk. this includes .svn, trunk, branches, tags, all within project1/trunk

How do I just include just the files (and potential sub-folders to be added later) that reside in common/trunk? enter image description here

1

1 Answers

0
votes

You need to point the URL of the external definition to a repository, not a working copy - point that to the repo that hosts the folder you want (in your case, the repo for 'common').

The local path is where you tell tortoise which folder you want - so all you'd need to put in there is trunk/

So your values for the new external definition would be:

Local path: trunk/

URL: file:///C:/Users/Chris/Desktop/master/common (assuming the repo for 'common' is in the same place as your repo for project1).

Hope that helps you get it sorted.

EDIT: Some further information following your update.

I've managed to get the external working using a relative path, though I've found you can't just have the external load into the trunk folder - it has to be a subfolder. The settings that worked for me are:

Local path: trunk/CommonTrunk (or whatever you want the subfolder to be called after the /)

URL: ^/../Common/trunk

Hope that gets you what you're after.