0

at our company we have some drupal projects that share some custom developed modules, so in svn, we have a dir structure like this:

project 1
-- sites
-- -- all
-- -- -- modules
-- -- -- -- custom
-- -- -- -- -- my_mod1

project 2
-- sites
-- -- all
-- -- -- modules
-- -- -- -- custom
-- -- -- -- -- my_mod2

Now, we want to share my_mod1 in other projects, like project 2, but if we simply copy/added it to svn, it will be difficult to maintain (dupe code, each one on one repo, so if we modify one, we will need to modify the other).

Probably, the ideal will be to have a central repo of custom modules, but I don't know if this is possible, or how to do it, so, please, we need your help with this ;).

Thanks in advance!

1 Answer 1

2

I'd suggest using SVN externals.

This way, every working copy can be made up of files from different repositories.

So, if for example you created a central repository of custom modules, then in each of your projects you could do something like this:

$ svn propset svn:externals "sites/all/modules/custom  
     http://hostname/modulesrepos" .

This will then checkout the directories in /modulesrepos to sites/all/modules/custom. If you do this for all of your projects, and treat the 'live' website as a working copy, then it will always pull the modules from your 'external' repos.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.