Share » Learn » eZ Publish » Using Subversion with eZ Publish

Using Subversion with eZ Publish

Friday 01 February 2008 10:35:00 am

  • Currently 4 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

You will encouter this problem when you are using your own configuration to suit your local development environment. There are three ways to address it.

Ignoring the .ini file(s)

You can ignore a specific file (or a group of files) by using "svn propset svn:ignore". However, your environment will not be updated when ini files are changed in the repository. If the communication between your team is good then you can use this technique:

  1. Define an ignore flag with "svn propset".
  2. Do not commit this change (so that this flag is local).
  3. When your team warns you about an ini change remove your ignore flag (by using "svn propdel") and update the ini file(s).

You may have to deal with occasional conflicts, but this is part of the game. Resolving conflicts with SVN is easy and most conflicts can be resolved very quickly.

If you want to know more about conflict managment with SVN you will find this URL useful:

http://svnbook.red-bean.com/en/1.1/ch03s05.html#svn-ch-3-sect-5.4

Updating the versioned .ini file(s)

Another way to deal with shared .ini files in local environments is to commit and checkout versioned ini file(s), but never committing changes that are specific to an environment. However, in my opinion, this is a less secure method and more prone to error.

Using specific identifiers

When using a new configuration that you know needs to be adapted to each development environment, you can use a specific identifier in the .ini files. To indicate that the file contains environment-specific ini settings, developers append '.specific' to the end of the filename.

For example, if each developer needs to connect to his own database you could rename (using "svn rename") site.ini.append.php to site.ini.append.php.specific.

When a developer does a checkout or update of the project, he will download some .specific ini files. This will tell him that he has to rename them and update them.

Note that you can use a PHP or shell script that will automatically rename .specific files to the correct name.

If I use .specific append files how can I port them to the other branches?

You can use a build system.

Build systems are very common and provide a lot of features. Here is a list of a few build systems you might use for your projects:

Use the tool that best fits your needs.

By using a build tool you can automatically create a specific version of your application based upon the rules you have defined. This is just one example of the functionality available with build tools. It is up to you to define which tasks you want to be done in which context.

Before diving in, take time to define what you really need to build and deploy in your application. Here is a quick checklist you may find useful:

  • Checking the projects out
  • Giving correct database rigths to be able to create tables
  • Creating the basic database schema
  • Fixing the rights on this database - you might not need CREATE TABLE anymore ;)
  • Fixing rights on the file system (bin/linux/modfix.sh might help you)
  • Compiling templates (bin/php/eztc.php might help you)
  • ...
36 542 Users on board!

Tutorial menu

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)