1

I have two folders laid out as below:

svn/BaseLibrary/trunk (which contains)
svn/BaseLibrary/trunk/Core
svn/BaseLibrary/trunk/Controls

I would like to include BaseLibrary as an external on another project so that the Core and Controls libraries sit inline with the rest of my project. So with my other project below:

svn/Project/trunk/Site

I want to add an external so that they can combine together like so:

/svn/Project/trunk/Core
/svn/Project/trunk/Controls
/svn/Project/trunk/Site

Is this possible? I've tried adding an external without the directory prefix so it is literally just the url to the directory but it won't parse.

https://svn.repo.co.uk/svn/BaseLibrary/trunk

Any ideas?

John_
  • 2,931
  • 3
  • 32
  • 49

2 Answers2

1

What if you added the two folders individually as externals to svn/Project/trunk/ ?

Core svn/BaseLibrary/trunk/Core
Controls svn/BaseLibrary/trunk/Controls
Luhmann
  • 3,860
  • 26
  • 33
  • It is a possible option but if I add other folders later into the original structure I'll have to manage them manually too. Plus any files that may exist in that folder too won't be brought in. I'm leaving it as a last resort! – John_ Feb 10 '10 at 23:42
1

Yes possible. On /svn/Project/trunk set the svn:externals property to have to externals:

Core ../BaseLibrary/trunk/Core@HEAD

Controls ../BaseLibrary/trunk/Controls@HEAD

Notes:

  • You must use a peg revision (that isn't HEAD). If you do not use a peg revision you are basically destroying your history (any tag/branch you make of the directory will continue to have externals pointing to the BaseLibrary trunk at the current HEAD, not when the historical tag was created)
  • Externals seem nice at first, but add many constraints and problems when you try to create and manage branches. IMO it is far better to make Project depend on a a specific "released" version of BaseLibrary, or if you really want the tight integration, keep Copy Core and Controls into your Project and do the extra merging. Yes, extra merging, but also full control, no surprises or limitations.
Community
  • 1
  • 1
Nathan Kidd
  • 2,919
  • 21
  • 22
  • Sound advice, I actually setup the external to a tag so that that it can receive bug fixes if required. Then the developer can manually set to a new tag to upgrade to the latest version of the library. – John_ Feb 11 '10 at 13:35
  • I probably mis-lead you by placing trunk as an example in my question. – John_ Feb 11 '10 at 13:37