You must first sign up to be able to contribute.

Contributing to Symfony with SVK

What is SVK ?

From the project's homepage :

svk is a decentralized version control system. 
It uses the Subversion filesystem but provides additional, powerful features. 
svk plays well with others, it can mirror remote Subversion, Perforce, and CVS 
repositories to perform offline operations.

SVK helps maintaining a patchset against a project, as it provides excellent merging and patch management capabilities. It also permits offline work.


Windows, Debian and Mac OS X installation are pretty straightforward.


$ apt-get install svk
$ svk depotmap --init


Download the installer from and launch it.

Mac OS X

Download the package from (or follow the dowload link from the project's homepage) launch the installer SVK.pkg

$ svk depotmap --init

From sources

Compiling SVK from sources is not an easy task. You have been warned.

Mirroring the Symfony SVN repository

Local mirror

We will just take care of Symfony's 1.2 branch for this example :

$ svk mirror //symfony/1.2

Synchronise the local mirror with the remote repository :

$ svk sync //symfony/1.2

We now have a full mirror of Symfony's svn 1.2 branch (with history).

Local branch

This is the branch we are going to work on, periodically synchronising it with Symfony's version.

$ svk cp -pm 'creating local branch for symfony/1.2' //symfony/1.2 //symfony/local/1.2

Let's grab a working copy of that branch :

$ svk co //symfony/local/1.2 ~/dev/symfony-1.2

We are now ready to contribute.

A session's lifecycle


We synchronise with the remote repository :

$ svk sync //symfony/1.2
Retrieving log information from 773 to 774
Committed revision 753 from revision 773.
Committed revision 754 from revision 774.

and merge updates into our local branch :

$ svk pull //symfony/local/1.2
Auto-merging (750, 754) /symfony/1.2 to /symfony/local/1.2 (base /symfony/1.2:750).
g   lib/addon/propel/builder/SfPeerBuilder.php
D   data/skeleton/app/app/i18n/global
New merge ticket: ee427ae8-e902-0410-961c-c3ed070cd9f9:/1.2:774
Committed revision 755

Commiting code to the local branch

This is exactly the same as with Subversion :

  • Edit some files.
  • Commit the files
     $ svk ci

Patch creation

Now that we have updated the local branch we need to generate a patch against the sources. SVK makes this really easy :

$ svk push -P MyFantasticPatch //symfony/local/1.2

The patch has been produced. Let's check :

$ svk patch --list

We can consult now the patch :

$ svk patch --view MyFantasticPatch
$ svk patch --view MyFantasticPatch > MyFantasticPatch.patch

SVK's patch commandset is rich. You can :

  • update patches to the latest version of remote repository sources :
     svk patch --update MyFantasticPatch
  • regenerate patch after further source modification
     svk patch --regen MyFantasticPatch

Further reading