Brief introduction to SVN

From Gramps
Revision as of 08:17, 11 April 2007 by Erikdr (talk | contribs) (The svnci script)
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, 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). With the SVN method, type the following in the command line:

  svn co https://svn.sourceforge.net/svnroot/gramps/trunk/gramps2

You should see the downloading progress reported in your terminal. If you would like to update your source tree after some time, execute the commandsvn update in the top directory of the source tree. 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 2.3

As of 02 Feb 2007, a development branch has been created. To grab a copy:

  svn co https://gramps.svn.sourceforge.net/svnroot/gramps/branches/gramps23

Usefull 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<\code>. 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:

*.py = 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 svnci script

A usefull script for helping you commit changes is svnci: Download svnci

Usage:

  • place svnci in your root svn directory, eg gramps2 or gramps23
  • you need to have the patchutils package installed, or svnci will throw an error (filterdiff is needed)
  • do edits and commit new files
  • edit the Changelog file with your edits
  • to commit changes to the svn repository, go to the root directory, and do ./svnci. This will collect all changes, and upload the change. The log message will be taken from the Changelog.

Browse svn

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