Table of contents:
Also known as svn or SVN.
History of Subversion
Wikipedia on Subversion!
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.
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.
Add new files in var/storage to svn checkout
# cd /web/pro/example.com/; find /home/web/pro/example.com/var/plain/storage/original/application -print0 | xargs -0 svn status | grep '? ' | tr '? ' '\n' | xargs svn add
Remove files from svn which have been removed from var/storage by eZ publish
# cd /web/pro/example.com/; find /web/pro/example.com/var/plain/storage/ -print0 | xargs -0 svn status | grep '! ' | tr '! ' '\n' | xargs svn remove
Log svn status command results to log file
# cd /web/pro/example.com/; svn status | tee ../example.com.status.2006.11.17.001.log
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.
# ls -l .ezpublish.3.8.6.stock access.php bin -> ../example.com/bin .bin.stock clr -> bin/shell/clearcache.sh cronjobs design -> ../example.com/design .design.stock doc extension -> ../example.com/extension .extension.stock ezpm.php ezpublish.cron index_image_mysql.php index_image_pgsql.php index_image.php index.php kernel kickstart.ini-dist lib LICENSE packages pre_check.php README.txt runcronjobs.php settings share soap.php support update var -> ../example.com/var .var.stock webdav.php # ls -la settings override -> ../../example.com/settings/override .override.stock siteaccess -> ../../example.com/settings/siteaccess .siteacces.stock
Example site repository layout
# ls -l bin design extension favicon.ico -> favicons/example.white.star.ico favicons robots.txt settings tmp var
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.
This is a Stub article. Help the eZ Publish community by expanding it!