Difference between revisions of "Conversion from Subversion to Git"

From Gramps
Jump to: navigation, search
(Documentation Changes)
 
(27 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{man warn|Obsolete|The Migration was completed successfully in 2013-2014}}
 
== Repository Changes ==
 
== Repository Changes ==
  
Line 32: Line 33:
 
== Code Changes ==
 
== Code Changes ==
  
=== Convert get_svn_revision to get_git_hash ===
+
=== 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.
 
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/svn_revision.py -> gramps/gen/git_revision.py - DONE
* gramps/gen/const.py
+
* gramps/gen/const.py - DONE
 +
* src/configure.in (gramps34 only) - DONE
  
 
=== Code to skip .svn directories ===
 
=== Code to skip .svn directories ===
Line 43: Line 45:
 
Two files have code for skipping subversion directories:
 
Two files have code for skipping subversion directories:
  
* gramps/plugins/tool/mediamanager.py
+
* gramps/plugins/tool/mediamanager.py - DONE
* gramps/test/regrtest.py
+
* gramps/test/regrtest.py - DONE
  
 
We can remove this code at some point.  Git does not pollute the source code tree with its files.
 
We can remove this code at some point.  Git does not pollute the source code tree with its files.
Line 50: Line 52:
 
=== Repository url needs changing ===
 
=== Repository url needs changing ===
  
Three files contain the repository url in their docstrings:
+
Three files contain the repository url:
  
* gramps/gen/config.py
+
* gramps/gen/config.py - gramps-addons
* gramps/gen/db/__init__.py
+
* gramps/gen/db/__init__.py - DONE
* gramps/webapp/init.py
+
* gramps/webapp/init.py - DONE
  
 
=== Change svn2cl -> git2cl ===
 
=== Change svn2cl -> git2cl ===
Line 60: Line 62:
 
There is a reference to svn2cl in the about dialog.  There is a git alternative available at http://savannah.nongnu.org/projects/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
+
* gramps/gui/aboutdialog.py - No change required
  
 
=== Headline News gramplet ===
 
=== Headline News gramplet ===
  
Will this still work?
+
Change url to point to Git repository. - DONE (gramps40 and master)
  
 
== Bug Tracker Changes ==
 
== Bug Tracker Changes ==
Line 74: Line 76:
 
The main changes required will be to the developer wiki pages:
 
The main changes required will be to the developer wiki pages:
  
* [[Brief introduction to SVN]] -> [[Brief introduction to Git]]
+
* [[Brief introduction to SVN]] -> [[Brief introduction to Git]] - DONE
* [[Getting started with Gramps development]]
+
* [[Getting started with Gramps development]] - DONE
* [[Running a development version of Gramps]]
+
* [[Running a development version of Gramps]] - DONE
* [[Committing policies]]
+
* [[Committing policies]] - DONE
* [[What to do for a release]]
+
* [[What to do for a release]] - DONE
* [[Development using Eclipse and Pydev]]
+
* [[Development using Eclipse and Pydev]] - DONE
 +
* [[Getting started with Gramps Trunk]]
  
 
Other wiki pages that will require minor changes:
 
Other wiki pages that will require minor changes:
Line 88: Line 91:
 
* [[Translation environment4]] - DONE
 
* [[Translation environment4]] - DONE
 
* [[Manual Generation]] - DONE
 
* [[Manual Generation]] - DONE
* [[Using the bug tracker]] - DONE (still refers to Trunk Project on the bug tracker)
+
* [[Using the bug tracker]] - DONE (<del>still refers to Trunk Project on the bug tracker</del>)
* [[Bug triage]] - DONE (still refers to Trunk Project on the bug tracker)
+
* [[Bug triage]] - DONE (<del>still refers to Trunk Project on the bug tracker</del>)
  
* [[Relationship Calculator]] - DONE (references to files still need changing)
+
* [[Relationship Calculator]] - DONE
* [[Date Handler]] - DONE (references to files still need changing)
+
* [[Date Handler]] - DONE
  
 
* [[Animal pedigree]] - DONE
 
* [[Animal pedigree]] - DONE
 
* [[Geographic Report]] - DONE
 
* [[Geographic Report]] - DONE
 
* [[HeadlineNewsGramplet]] - DONE
 
* [[HeadlineNewsGramplet]] - DONE
* [[InformationGraph]] - DONE
+
* [[Addon:InformationGraph]] - DONE
  
* [[Mac OS X:Build from source:Application package]]
+
* [[Mac OS X:Build from source:Application package]] - DONE
* [[Linux:Build from source]] - DONE (references to INSTALL and README files still need changing)
+
* [[Linux:Build from source]] - DONE
* [[Debian]]
+
* [[Debian]] - DONE
  
 
* [[Gramps-Connect]]
 
* [[Gramps-Connect]]
Line 108: Line 111:
  
 
* [[GEPS 013: Gramps Webapp: Initial Thoughts]] - DONE
 
* [[GEPS 013: Gramps Webapp: Initial Thoughts]] - DONE
* [[GEPS 013: Gramps Webapp]] - DONE (references to files still need changing)
+
* [[GEPS 013: Gramps Webapp]] - DONE
* [[GEPS 023: Storing data from large sources]] - DONE (references to files still need changing)
+
* [[GEPS 023: Storing data from large sources]] - DONE
  
 
Pages requiring changes when gramps-addons is converted:
 
Pages requiring changes when gramps-addons is converted:
  
 
* [[Addons development]]
 
* [[Addons development]]
* [[DescendantsLines]]
+
* [[Addon:DescendantsLines]]
 
* [[GEPS 005: Enhanced Plugin Interface]]
 
* [[GEPS 005: Enhanced Plugin Interface]]
 +
 +
 +
[[Category:GEPS|C]]
 +
[[Category:Developers/General]]

Latest revision as of 02:29, 17 January 2022

Gnome-important.png
Obsolete

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>

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

Rename "trunk" to "master".

Procedural

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/svn_revision.py -> gramps/gen/git_revision.py - DONE
  • gramps/gen/const.py - DONE
  • src/configure.in (gramps34 only) - DONE

Code to skip .svn directories

Two files have code for skipping subversion directories:

  • gramps/plugins/tool/mediamanager.py - DONE
  • gramps/test/regrtest.py - 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/config.py - gramps-addons
  • gramps/gen/db/__init__.py - DONE
  • gramps/webapp/init.py - DONE

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 - 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: