Using eZ + Subversion? How would you do it?

Author Message

kracker (the)

Sunday 22 October 2006 7:44:42 pm

Using subversion to track and commit changes to to 'var/' or 'settings' directory in production. How would you do it?

I'm wondering if anyone else has done this before, if so if you would share your thoughts on the subject.

How do you deal with removed files or constantly changed files such as updated files, logs files or cache directory structures?

//kracker
<i>film: The pink panther ...</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Paul Forsyth

Monday 23 October 2006 1:56:58 am

Hi kracker,

I only use subversion for human created files, so settings, design, extensions, those sorts of files.

The storage directory is actually covered by eZ when you think about it since all objects are versioned. If you need to version these in subversion i would tar ball the database and storage files.

Any files supplied by eZ - the distro, or generated by the system - such as cache - should not be versioned imho.

Paul

Andreas Adelsberger

Monday 23 October 2006 3:07:32 am

hi, all. I am facing the same problem. At first only my extensions,setttings and design were versioned, but I found it pretty annoying to go to every subfolder for checking in the files after some changes, so I put everything under version control.

Now I can just rightclick the main project folder and do my checkouts, etc. although I agree that there is no need for versioning the official repository files.

---------------------------------------
Styleflasher New Media OG
Websites. Games/Multimedia.

Kristof Coomans

Monday 23 October 2006 5:14:41 am

Versioning the ez distro files can be handy if you apply your own patches on them. I usually use a setup similar to the vendor branches as described in the subversion book: http://svnbook.red-bean.com/nightly/en/svn.advanced.vendorbr.html

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

kracker (the)

Monday 23 October 2006 5:38:40 am

I heard of people using symbolic links to versioned files instead of placing the entire eZ publish installation into svn.

The idea being if you don't modify the 'stock' eZ publish core (non-meta).

By doing this can make upgrading eZ publish installation simpler.

As you do not have to deal with svn committing core files after an eZ publish upgrade (or conflicts).

Leaving eZ publish core files are loosely coupled to the versioned meta files via symbolic links in a non-versioned eZ publish installation directory.

Running a kind of eZ publish 'build script' which performs the following commands

1) extract 'stock' eZ publish (core)
2) move 'stock' meta folders (avoid conflict with core directories)
3) create symbolic links from 'stock' meta folders to subversion directory structures (override core)

# base_path="/web/pro/"

# cd $base_path

# tar -zxf /web/arc/src/ez/ezpublish-3.7.6-gpl.tar.gz

# cd ezpublish-3.7.6

# mv extension .extension
# mv design .design
# mv var .var

# ln -s ../example.com/favicon.ico favicon.ico
# ln -s ../example.com/extension extension
# ln -s ../example.com/design design
# ln -s ../example.com/var var
# ln -s ./bin/shell/clearcache.sh clr

cd settings

# mv override .override
# mv siteaccess .siteaccess

# ln -s ../../example.com/settings/override override
# ln -s ../../example.com/settings/siteaccess siteaccess

This also allows me to svn status /web/pro/example.com (svn versioned eZ publish directories) in one command, including commits, etc!

I also hear you can simply <i>not</i> commit cache files (yet I hear of many do add non-recursively the key top level directories in the various used in the cache directory structure).

I've even heard of people who will hand-commit files added, modified and removed from 'var/plain/storage' and 'var/log/*' as these are fairly simple commands to script if performing these commits by hand are too time consuming.

Excluding the directories '/var/cache/*', '/var/plain/cache/*' is simple enough to do.

It sounds a little time consuming to have a versioned (where applicable or useful) 'var/' directory structure / eZ publish installation meta files required by db.

Without saying I hear of many performing backups of the eZ publish database on a regular plan and schedule (which should increase to match the frequency of changes to it, for example active sites might backup more frequently to protect their live eZ publish db data). While for others looser scheduled backups of both the eZ publish db and files (semi-quarterly) is sufficient.

mysqldump --skip-opt --single-transaction example_com_pro_376 -p > /web/arc/caption/db/sql_example_com_pro_376__20061123_072842_001.sql

Upon considering the amount of svn commits required to keep file 'var/plain/storage' modifications of a very high traffic eZ publish installation's 'var/' directory stored in subversion.

I wonder if an eZ publish extension (name guess: ezversionedvarsvn) which when activated and configured would override a base class in eZ publish, say in relationship to 'var/<siteaccess>/storage' to include transparent automation of subversion commits to the added, modified, removed files would not simplify my say quarterly svn maintenance. In a way perhaps providing duplicate functionality as the hand commits (logged of course) yet remove the requirement of human management (which may or may not be necessary).

//kracker
<i>film: the trail of the pink panther ...</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Piotrek Karaƛ

Saturday 17 October 2009 9:22:37 am

Versioning the ez distro files can be handy if you apply your own patches on them. I usually use a setup similar to the vendor branches as described in the subversion book: http://svnbook.red-bean.com/nightly/en/svn.advanced.vendorbr.html

Kristof, thanks for the pointer to the article. It actually might be very close to what I am after and it partially answers the major question I had before I read about vendor branches - whether I should worry much about leaving some old stuff behind:
<i>Although it might also be just fine to let these same files live on in unused obscurity!</i>
eZ Publish doesn't seem to change too dynamically when it comes to file and dir structures, and potential class duplicates should be very easy to diagnose and locale. What's your experiences on that?

Thanks,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.