Reputation: 11
I am new to SVN so please forgive me if I am talking absolute rubbish here.
What i am trying to achieve is the following:
I want to have two repositories in my project: vendor and local.
The vendor repo will contain source code for a framework I am using and the local repo will contain all of my local code that runs within the framework. I should also note that my local source code will be interspersed with the vendors via symlinks.
I want to keep my repositories separate in as much as that I want to be able to just check out my local repo and work on it without checking out the whole project. Although at times the whole project will have to be checkout out.
Ideally I need to be able to checkout, work on and commit to the following:
Will SVN externals allow this behaviour? If not, how is best to achieve this?
Upvotes: 1
Views: 410
Reputation: 8427
By separating your local and vendor repositories, you cannot check out the entire project (local + vendor) in a simple step. I suppose you to have just one repository, including your local and vendor source code. Now you can:
1) Define an external for your local directory to get the vendor code whenever you check out it. (item 1 is satisfied)
2) Define an external for your vendor directory to get the local code whenever you check out it. (item 2 is satisfied)
3) If you want to check-out both your local and vendor source code, it is just enough to check out your root (/trunk) folder. (item 3 is satisfied)
If you still insist in having two separate repositories, items 1 and 2 could easily be satisfied by externals. For the third item, you can write a simple script to check out your local + vendor code into your working folder.
Upvotes: 0
Reputation: 7990
SVN externals will allow you 1) and 2).
For 3), you will have to perform multiple commit commands - one on each modified repository.
But it is quite easy to script (at least on linux).
On the other hand, I would recommend you to integrate with your vendor on different level - for instance, in java it would be better to have separate repos and integrate via JAR built on your server.
Upvotes: 0
Reputation: 3509
I don't see a reason to use svn:externals
to solve your problem. If all you need to do is check out different projects, you can just structure your repository like so:
/
local/
branches/
tags/
trunk/
vendor/
<vendor-specific project structure>
When you need your local code, run svn co <server>/local/<branch>
and when you need your vendor code you run svn co <server>/vendor/<whichever resource(s) you need>
. Is there anything that I missed?
Upvotes: 1