dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Search | Go
Wiki > Main > DocsIndex > UsingSVN

Accessing source code via Subversion (SVN)

Rockbox no longer uses SVN.

To check out and work on the source code, see UsingGit instead.

Browsing the repository

Just go here

Downloading (checking out) the source

You, obviously, need to have Subversion (SVN) installed to do this.

The examples below use the 'trunk', since that is what most people are interested in. We find it useful to call the checked out trunk "rockbox", for convenience.

How to check out the source code

   svn co svn:// rockbox

If you would like to use older sources use the -r parameter replacing YYYY-MM-DD with the appropriate date:

   svn checkout svn:// -r {YYYY-MM-DD} rockbox

To check out a specific revision, use

   svn checkout svn:// -r 12345 rockbox

A "rockbox" directory will be created in your current directory, and all the directories and source files go there.

Checking in modifications

SVN is a "no-reserve" version control system. This means that you work on your local files without first reserving them. Any conflicts with other developers are detected when you check-in, or "commit" as it's called in SVN.

   svn commit <filename>

If this is the first commit from the local directory you will be asked for a password for your local username, If it is asking for the password for the wrong account just hit enter and it will prompt for the correct username and password.

This will start an editor and ask you to describe the changes you've made. If you want, you can use the -m command line option to specify the comment right there:

   svn commit -m "This is my change comment" <filename>

Note: Before checking in modifications, test-build all targets (player, player-old, recorder, player-sim, recorder-sim) to make sure your changes don't break anything.

If this is a fix for a bug in FlySpray use the tracker number in this format: FS#xxxx in the comment so that a link to the tracker is created on the RockBox home page.

Updating your repository

Since several people commit to the repository, you will need to periodically synchronize your local files with the changes made by others. This operation is called "update":

   svn update

Adding a new file

Adding a file is very simple:

   svn add <filename>

When adding a new source file, remember to set the keywords property:

   svn pset svn:keywords "Author Date Id Revision" <filename>

If you are adding a binary file, you need to set the mime-type property:

   svn propset svn:mime-type application/octet-stream <filename>

These changes, like any other change, has to be committed before they will be visible on the server.

Note: If your file was created in Windows it may have had the "executable" flag set by default, even if it's simply a text file (.c, .tex, etc). To fix this either do chmod -x filename before svn add, or svn propdel svn:executable filename afterwards.

Querying the status of your files

Sometimes it is interesting to get a list of the status of your files versus those on the remote repository. This is called "status":

   svn status

Producing a diff of your changes

If you want to see how your local files differ from the SVN repository, you can ask SVN to show you:

   svn diff [files(s)]

See also WorkingWithPatches for related info on patches in the Rockbox project.

Reverting changes

To revert changes in your local SVN checkout use (from the source root):

   svn revert -R . (don't forget the period!)

To go back to a specific revision, use:

   svn update -r 12345

Note this will not remove files you have added but only restore files that are in the SVN repository.

What happens in the repository?

Subscribe to the rockbox-cvs list to get mails sent to you for every commit done to the repository.

subscribe to rockbox-cvs

Note that this may cause quite a few mails to get sent during periods of intense development.

Learning more about SVN

If you want more detailed and comprehensive information about Subversion, you can read the online version of Version Control with Subversion, a free book about SVN.

Tagging releases

Whenever a binary is released from code in SVN, it should be tagged by issuing a command similar to the following:

svn copy svn:// \
         svn:// \
         -m 'Tag release v2 of the Sansa E200 bootloader and sansapatcher'

More information about tagging in SVN can be found at and the Rockbox tags can be browsed at

Reverting a commit

In the event that the last check in needs to be reverted the following steps can be followed (assuming that you are starting at revision 19094):

   svn diff -r 19093 > patch.diff

   patch -p0 -R < patch.diff

   svn commit

r37 - 02 Apr 2021 - 20:46:07 - UnknownUser

Parents: DocsIndex
Copyright © by the contributing authors.