Alex
Alex

Reputation: 3958

Tortoise SVN include part of project in other project

I have a Tortoise SVN repository that has 3 projects in it:

DAL
Services
Controller

These 3 projects combined are call MainProject

I want to be able to extract the DAL only from the repository MainProject, and then include it in other repositories going forward.

Is this possible, and if so how can I do it?

This would mean that if I then included the DAL in MainProject2, I could simply update the DAL and any changes made in DAL in MainProject would move to MainProject2 via the update command

Upvotes: 0

Views: 25

Answers (1)

Israel Unterman
Israel Unterman

Reputation: 13510

You can do this by adding DAL as external project.

Right click on you current project, let's call it ProjectA, select ToroiseSVN/Properties/New and choose External. Enter the SVN path to DAL.

Then you need to do 2 things: 1. Commit - so your new external property will be saved to the repository. 2. Update - this will bring DAL to ProjectA as external.

If you update DAL and commit it, and then update ProjectA, it will pull the updated DAL.

But there is a catch here. If want to go back to previous versions of ProjectA, SVN will still give it to you with the most updated DAL version, which in most cases will not be what you want.

Hence the preferred way is not to link to the HEAD revision of DAL, but rather to a specific revision. This way you revisions of ProjectA are linked with a specific revision of DAL. Whenever you update DAL, you can update you external to point to the newer DAL revision, the commit and update ProjectA.

Upvotes: 2

Related Questions