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.

eZ debug

Timing: Jan 18 2025 15:14:38
Script start
Timing: Jan 18 2025 15:14:38
Module start 'layout'
Timing: Jan 18 2025 15:14:38
Module start 'content'
Timing: Jan 18 2025 15:14:39
Module end 'content'
Timing: Jan 18 2025 15:14:39
Script end

Main resources:

Total runtime1.0068 sec
Peak memory usage4,096.0000 KB
Database Queries72

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.0313152.6406
Module start 'layout' 0.00540.0030 740.671939.4766
Module start 'content' 0.00840.9971 780.1484723.7422
Module end 'content' 1.00550.0013 1,503.890620.7500
Script end 1.0068  1,524.6406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3183160.0002
Check MTime0.00140.1429160.0001
Mysql Total
Database connection0.00130.124810.0013
Mysqli_queries0.930192.3804720.0129
Looping result0.00090.0874700.0000
Template Total0.976196.920.4880
Template load0.00200.200320.0010
Template processing0.974096.745220.4870
Template load and register function0.00010.009910.0001
states
state_id_array0.00130.134010.0013
state_identifier_array0.00240.243020.0012
Override
Cache load0.00180.1800530.0000
Sytem overhead
Fetch class attribute can translate value0.00060.055050.0001
Fetch class attribute name0.00180.1822100.0002
XML
Image XML parsing0.00260.257550.0005
class_abstraction
Instantiating content class attribute0.00010.0062110.0000
General
dbfile0.00130.1325370.0000
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 33
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs