Subversion

About Subversion

Also known as svn or SVN.

History of Subversion

Wikipedia on Subversion!

Tips

Use of Subversion for your eZ Publish projects is now deprecated.

The business and community projects for eZ Publish are all (slowly) migrating to using Git for version control.

We strongly recommend you replacing your Subversion usage with Git today.

Site Development

Using Subversion to manage your eZ publish site development.

Reasons to use subversion to store the site specific customization

  • Simple to run several sites from a single eZ publish (stock) source directory.
  • Simple to mirror production or development installations using the production, settings,design,extension,bin customizations
  • Simple to sync changes from one environment / server / installation instance to others
  • Management of templates,settings,extension,bin,var file changes and releases
  • Archival of the entire history of your eZ publish development
  • Collaborative resource, share source code access with your developers, reduce development costs by using management processes

Dealing with changes made to var/ directory by eZ publish

It can often be time consuming to perform a manual commit to a site repository checkout with changes made to it by eZ publish. Especially adding or removing 1000+ files from the checkout. Here are some example commands which can be used to automate this process. After using these commands you may perform a hand commit or a mass (general/all files) commit.

Example Commands

Add new files in var/storage to svn checkout

 

Remove files from svn which have been removed from var/storage by eZ publish

 

Log svn status command results to log file

 

Unpack stock eZ publish and prepare build and create links

# cat /web/ini/bin/int.stock.svn.links.sh
#!/bin/bash


wget http://ez.no/content/download/152158/995731/file/ezpublish-3.8.6-gpl.tar.gz

tar -zxf ezpublish-3.8.6-gpl.tar.gz

ln -s ezpublish-3.8.6-gpl doc

cd doc

# move stock folders to invisible

mv bin .bin;
mv var .var;
mv design .design;
mv extension .extension;
mv settings/override settings/.override;
mv settings/siteaccess settings/.siteaccess;

# create links

ln -s ../example.com/bin bin;
ln -s ../example.com/var var;
ln -s ../example.com/design design;
ln -s ../example.com/extension extension;
ln -s ../example.com/settings/override settings/override;
ln -s ../example.com/settings/siteaccess settings/siteaccess;

Example eZ publish stock layout with symlinks to site repository checkout.

 

Example site repository layout

 

Note: This method has a few negative side affects long term maintenance. First storing the extension directory as a whole provides for stronger extension source code management.

Yet for general purpose usage this notion of storing the extension dir should be removed and replaced instead with an abstraction. Instead of storing extensions per site repository, store your extensions in a separate repository, install ezsvn and use it to install your extensions needed via external repository.

Second, the design directory should really only contain the non-stock site design directories. These would be symlinked into your existing stock design directory.

Third, the settings directory should really only contain the non-stock override and siteaccess directories. These would be symlinked into your existing stock design directory.

External Links