Conversion from Subversion to Git

From Gramps
Revision as of 01:08, 4 November 2013 by Nick H (talk | contribs) (Created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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>

Properties

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>

Convention

Do we want to rename "trunk" to "master"?

Code Changes

Convert get_svn_revision to get_git_hash

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

  • gramps/gen/svn_revision.py
  • gramps/gen/const.py

Code to skip .svn directories

Two files have code for skipping subversion directories:

  • gramps/plugins/tool/mediamanager.py
  • gramps/test/regrtest.py

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 in their docstrings:

  • gramps/gen/config.py
  • gramps/gen/db/__init__.py
  • gramps/webapp/init.py

Change svn2cl -> git2cl

There is a reference to svn2cl in the about dialog. There is a git alternative available at http://savannah.nongnu.org/projects/git2cl/.

  • gramps/gui/aboutdialog.py

Documentation Changes

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

  • Brief introduction to SVN
  • Getting started with Gramps development
  • Committing policies
  • Development using Eclipse and Pydev
  • Addons development

Other wiki ages that will require changing can be found by searching for "svn".