Brief introduction to SVN

From Gramps
Revision as of 11:58, 8 April 2008 by Pez4brian (talk | contribs) (replace svnci with svn2cl)
Jump to: navigation, search

The development source of GRAMPS is stored in the SVN repository. This helps synchronizing changes from various developers, tracking changes, managing releases, etc. If you are reading this, you probably want to do just two things with SVN: download latest source or the development version, or upload your changes.

Stable version 2.2.x

  • To download the source to a /home/~user/gramps22 directory, you can use two methods to access the SVN repository:
  1. An http frontend to gramps SVN
  2. SVN access
  • To upload your changes, you have to have developer access.

The second method requires that svn be installed on your system (Debian/Ubuntu: apt-get install subversion; Fedora: yum install subversion). With the SVN method, type the following in the command line:

  svn co gramps22

You should see the downloading progress reported in your terminal. If you would like to update your source tree after some time, execute the following command in the top directory of the gramps22 source tree:

  svn update

To commit your changes, you can execute:

  svn commit

Since uploading is a potentially dangerous operation, you have to explicitly obtain a write access to the SVN repository from Don Allingham or Alex Roitman.

Unstable development version 3.0

Also see: Running a development version of Gramps, and Getting Started with GRAMPS 3


Obtain it

As of 02 Feb 2008, there are two version of the 3.0 code in SVN. A development branch at /trunk has been created for the unstable version (now the new trunk) and the version building towards a stable release is at /branch/gramps30.

To checkout a copy of unstable trunk to ./gramps30:

  svn co gramps30

To checkout a copy of the unstable pre-beta to ./gramps30b:

  svn co gramps30b

Prepare it

Now go into the gramps30 directory and type


You will get warnings of missing packages that GRAMPS needs to build from source. The most common warnings are, that you miss the gnome-common package if you run under Linux and Gnome. If you run Ubuntu install via Synaptic the 'gnome-common' (version 2.20.0-0ubuntu1): common scripts and macros to develop with GNOME: gnome-common is an extension to autoconf, automake and libtool for the GNOME environment and GNOME using applications. Included are and several macros to help in both GNOME and GNOME 2.0 source trees. Install these and/or any other missing packages, read INSTALL and README file in the gramps30 dir for pointers. An important library is also libglib2.0-dev. Check whether your system has this package installed. This will execute the make command too. If not, type after the above



Do not install the development version. That is, do not type sudo make install.

Some build experience with Fedora 8

You can use the command line to install gnome-common. As root:

#yum install gnome-common

This will install the 2.18.0 version. Also install intltool as root:

#yum install intltool

This installed the version 0.36.2 (only 89k). It also takes care of some of the needed dependencies like auto-conf (2.16.9) and automake (1.10.6) There were still some problems to run autogen script, so I installed gettext. Finally i had to install

#yum install glib2-devel

This got rid of all the errors (I struggle a while to get rid off the glib-gettext.m4 error).

Now you can run the ./autogen script and do make.

Run the development version

As you should not install the development version, how can you try it out? Easy, just type the following in the gramps30 directory

python src/


Do not open your existing databases with gramps 3.0, it might destroy your data, and will make it impossible to use the data in the stable version 2.2.x. To try it out, export your database to a gramps xml file, eg test_version_3.0.gramps, create a new family tree in GRAMPS 3.0, and import this xml file.

Where for bugs?

The bug tracker has in the right top angle different projects. Choose project 3.x and submit an issue.

Useful things to know

Subversion commands

svn help add
svn help commit
svn help log

Adding files to repositories requires you to set some properties to the files. See svn help propset. You can use the propget on existing files to see how you should add it. A convenient way is to common files to your ~/.subversion/config file, eg in my config I have:

enable-auto-props = yes

*.py = svn:eol-style=native;svn:mime-type=text/plain;svn:keywords=Author Date Id Revision
*.po = svn:eol-style=native;svn:mime-type=text/plain;svn:keywords=Author Date Id Revision
*.sh = svn:eol-style=native;svn:executable
Makefile = svn:eol-style=native
*.png = svn:mime-type=application/octet-stream
*.svg = svn:eol-style=native;svn:mime-type=text/plain


The Gramps project does not keep a ChangeLog file under source control. All change history is captured by Subversion automatically when it is committed. A ChangeLog file is generated from the SVN commit logs before each release using svn2cl. Developers should take care to make useful commit log messages when committing changes to Subversion. Here are some guidelines:

  • Try to make a descriptive message about the change.
  • Use complete sentences when possible.
  • When committing a change that fixes a bug on the tracker, use the bug's number and summary as the message.
  • When committing a patch from a contributer, put the contributor's name and e-mail address in the commit message.
  • It is not necessary to put the names of the files you have modified in the commit message because Subversion stores that automatically.

Other usage tips

  • Additional tips and recommendations related to committing changes: SVN Commit Tips

Browse svn

An alternative to the command line tools to view the svn repository is the online interface.