tags:

views:

44

answers:

2

I have a project which involves two other different projects. So normally, I would use svn:externals for this, but here the situation is a little different. I'm working with a particular CMS, which I have set up in a way that I can easily checkout the repository, add in some custom stuff and have a website using my "framework". But If I wanted to version control the custom stuff as well, how would I go about doing that?

For example, I have a folder called templates. I would like some of the contents from here to come from repository A (the "framework"), and some from repository B. If I check out repository A, I can't add in that directory as an external from B, since it exists already.

Is there another approach here?

A: 

You could fill your CMS directories with exports instead of checkouts. Then there will be no conflict between the different repositories.

Of course this way you loose the ability to commit any changes from within your CMS directories.

tangens
Right, I definitely need the ability to commit changes. Not only me, but anybody else who checks out the repository (which is what would have made externals so appealing)
blockhead
+1  A: 

You have the option of doing “shallow” checkouts, meaning building your working copy with exactly the directories and files you want. That would enable you to sprinkle in content from either repository where needed, and each working copy would function separately from the other. See the documentation for details.

What you want to do is structure your project’s files so that the contents of the various repositories are segregated.

Example:

\myProject

From repo A:
\myProject\foo
\myProject\foo\subfoo

From repo B:
\myProject\foo\bar
\myProject\foo\baz
Michael Hackner