Most Popular
Recently Added
Recently Updated

Switching a Cerb installation from Subversion to Git

Introduction

Prior to the release of Cerb 5.x, the official recommendation was to use Subversion for installing and upgrading the app. This made sense years ago when support wasn't prevalent for the next generation of distributed version control tools like Git. Today, Git is available for all major platforms. Our official repositories are managed with Git and collaboration is provided through GitHub.

If you're still using Subversion to manage your Cerb installation, we highly recommend that you migrate to Git.

As of January 2012 we have discontinued hosting our own Subversion repositories.

Make the change

Move your existing Cerb installation to a directory named cerb-old.

Make a backup

Make a recent backup using the instructions here:
http://cerbweb.com/book/latest/admin_guide/backups/

Keep local modifications

Change directory to your existing files:

cd cerb-old

Make a patch of your local modifications:

svn diff > my_changes.patch

Find your existing version

grep "APP_VERSION" -m 1 api/Application.class.php

Download the same version of Cerb with Git

Return to the parent directory where cerb-old is located:

cd ..

Perform a fresh checkout of the Cerb project files from Git using the same version. Replace <version> in the command below with the version number from the previous section above with the following convention:

  • 5.5.0 -> 5.5
  • 5.5.2 -> 5.5.2

In other words, if the version ends in .0 then just include the first two numbers.

Checkout the same version of Cerb from GitHub using Git:

git clone -b <version> git://github.com/wgm/cerb6.git cerb

Merge the copies

Remove the .svn subdirectories from storage and then move it to cerb:

find cerb-old/storage -type d -name '.svn' -exec rm -Rf {} \;

mv -n cerb-old/storage/* cerb/storage

You can then apply your patch to the new files:

cp cerb-old/my_changes.patch cerb

cd cerb

patch -p0 < my_changes.patch

rm my_changes.patch

Finish up

If you placed any custom plugins in the /features directory, move them from cerb-old/features to cerb/storage/plugins. This is where all custom plugins should go in the future. Be careful to not copy any official plugins.

Move or rename the cerb directory back to your desired location.

Make sure all the files are owned and readable by the webserver user, and the /storage directory and its contents are owned and writeable+readable by the webserver user.

This might be a good time to upgrade to the latest version using Git.

Open Cerb in your web browser.


Properties ID: 000071   Views: 12782   Updated: 1 year ago
Filed under:
knowledgebase comments powered by Disqus