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

Creating the SVN repository

To work with SVN, you must first create an SVN repository. This can be done using the "svnadmin" command.

On the server which will host the SVN repository, type this command:

svnadmin create --fs-type fsfs /path/to/the/repository

Note that you can add extra parameters to the svnadmin command. Please refer to the SVN documentation to learn more.

Creating the basic directory structure

After creating the repository, you next create a basic directory structure. If your project is called 'my project' you will have something like this:

myproject
   |-- branches
   |-- tags
   `-- trunk

Putting your eZ Publish instance in SVN

Download the latest eZ Publish version, extract it in the 'trunk' directory and install it on your computer. You will have a result like this:

myproject
   |-- branches
   |-- tags
    `-- trunk</span>
    `-- ezpublish-4.0.0
    |-- ....

This means that the eZ Publish instance is stored under the 'trunk' directory with all the default configuration for the design and connecting to the database.

Note that there are other ways to store an eZ Publish instance. Some people prefer putting all the eZ Publish code right under the 'trunk' directory. I would not recommend doing this if you plan to work with third-party systems combined with eZ Publish, such as bulletin boards, blog engines, etc.

Once you have this basic directory structure, it is time to import it into SVN. This can be with this command:

svn import -m 'initial import of the eZ Publish instance' path/to/myproject http://url/of/the/repository

This will take a few seconds, depending on your bandwith.

Once the import is finished you can check everything is OK by using the "svn list" command:

svn list http:://url/of/my/svnrepository

You should see the files you just imported.

If everything is OK then you can start working with the source code in the repository. Use the "svn checkout" command to make a local copy of the repository on your system. You now work on (and, if you like, build) your own copy of the code. When your changes are complete, use the "svn commit" command to copy your local changes back to the SVN repository.

(Delete the former local copy which you used to create the SVN repository. You shouldn't use it anymore.)

Note: If you do not want to store certain files (such as kernel, libs, translation, etc) in the repository you can use the "svn:external" property [ http://svnbook.red-bean.com/en/1.0/ch07s03.html].

36 542 Users on board!

Tutorial menu

Printable

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

Author(s)