Conversion from Subversion to Git

From Gramps
Revision as of 02:29, 17 January 2022 by CallMeDave (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Migration was completed successfully in 2013-2014

Repository Changes

Revision number

Git uses hashes rather than revision numbers. We plan to keep the subversion revision number in the commit messages, but convert it into a shorter more readable format.

It will be possible to find a subversion revision with:

git log --grep=<revision>


Git does not have file-level properties. Instead, file attributes can be defined in the .gitattributes file.

Line ending characters (CRLF/LF) and file types (text/binary) can be defined in the .gitattributes file. This will replace the svn:eol-style and svn:mime-type properties.

The svn:ignore properties are replaced by the .gitignore file. This is already present for users of the git mirror.

It is not easy to implement useful keyword expansion of $Id$ in git, so we don't propose to do so. The same information can be obtained with:

git log -1 <path>


Rename "trunk" to "master".


We want to minimize the time window when the commits are not possible during the transition. At some point we'll switch the old SVN repo to read-only mode --- this will be announced on the devel list.

Can we push our commits from the git repositories that tracked John's repo with git-svn, maybe this should be set up as an interim approach?

Code Changes

Convert get_svn_revision to get_git_revision

The function to return the latest svn revision number needs to be replaced by one to return the latest commit hash.

  • gramps/gen/ -> gramps/gen/ - DONE
  • gramps/gen/ - DONE
  • src/ (gramps34 only) - DONE

Code to skip .svn directories

Two files have code for skipping subversion directories:

  • gramps/plugins/tool/ - DONE
  • gramps/test/ - DONE

We can remove this code at some point. Git does not pollute the source code tree with its files.

Repository url needs changing

Three files contain the repository url:

  • gramps/gen/ - gramps-addons
  • gramps/gen/db/ - DONE
  • gramps/webapp/ - DONE

Change svn2cl -> git2cl

There is a reference to svn2cl in the about dialog. There is a git alternative available at

  • gramps/gui/ - No change required

Headline News gramplet

Change url to point to Git repository. - DONE (gramps40 and master)

Bug Tracker Changes

Rename the "Trunk" project to "Master".

Documentation Changes

The main changes required will be to the developer wiki pages:

Other wiki pages that will require minor changes:

Pages requiring changes when gramps-addons is converted: