After having worked with subversion for a while I finally got time to restructure my repository layouts. What I want is a simple way to update all the sites I maintain and I want those sites under version control.
In order to get a nice update-able project directory tree we choose a layout listed below.
You could opt not to use the data directory and even leave out the sites directory but my guess is you get into more troubles. When using windows checkout the junction tool for creating symlinks.
svn checkout http://example.com/svn/drupal-6-core
cd drupal-6-core
mkdir trunk
cd trunk
wget http://ftp.drupal.org/files/projects/drupal-6.14.tar.gz
tar xzf drupal-6.14.tar.gz
mv drupal-6.14 www
rm drupal-6.14.tar.gz
cd www
mv sites ../sites
ln -s ../sites/
cd ../..
svn add *
svn commit -m "Initital drupal-6-14 checkin."
We now create our project from scratch and then drop it to reuse the trunk.
We assume we have a fresh repository named project. Now the magic step is adding the drupal-6-core repository as an external one into ours.
svn checkout http://example.com/svn/project
cd project
mkdir trunk
svn add trunk
cd trunk
Now we link our project to the drupal core repository.
svn propedit svn:externals .
Add this line with your editor
www http://example.com/drupal-6-core/trunk/www
Next we commit our changes.
svn commit -m "Added external drupal-6-core repository."
You may now delete your project directory and checkout the trunk instead. You will note that you get the drupal-6-core sources too.
svn checkout http://example.com/svn/project/trunk project
cd project
As we have our initial install we need a sites/ directory. So we export this from drupal-6-core.
cd project
svn export http://example.com/drupal-6-core/trunk/sites
svn add sites/
svn commit -m "Initial sites directory."
Depending on your needs you could remove sites/all
# rm -r sites/all
You may now add modules to your site.
Reacties
Nieuwe reactie inzenden