This page documents how to go about getting a KDE module ready for the Great Git Migration of 2010.
The necessary tools are hosted at http://www.gitorious.org/svn2git. To get started do:
This will get you the source code to build svn2git and the KDE ruleset files as they currently exist. Build the svn2git tool before moving on to the next step.
Make sure you have Qt4 installed, then simply issue qmake && make to build the executable called "svn-all-fast-export"
The format for the svn2git rules is pretty simple. First and foremost you have to declare some repositories:
create repository kdelibs end repository
This tells svn2git that it should create a git repository called "kdelibs" that we can later on use to put commits into it.
The rest of the file are rules matching specific paths in Subversion, each rule specifies what to do with the commits that appeared at the given path. The possible actions are ignoring them or adding them to a particular branch in a particular repository. Note: Ignoring is done by simply leaving out the information about the repository and the branch.
As examples are more explanatory, the following rule would put all commits from 123453 to 456789 from the path /trunk/KDE/kdelibs into the master branch of the kdelibs repository:
match /trunk/KDE/kdelibs/ min revision 123453 max revision 456789 repository kdelibs branch master end match
The min and max revision are useful in cases where the same path in SVN contains code for different branches. An example would be KDevelop3, where KDevelop 3.3 was shipped with KDE 3.5 until 3.5.7, 3.5.8 contained KDevelop 3.4 and 3.5.9 contained KDevelop 3.5 and all of those kdevelop versions are now under /branches/KDE/3.5/kdevelop.
The two revision parameters are however not mandatory, if they're left out, then all commits that went to the given matching path in SVN are taken over into the specified branch.
To generate tags with git you use a special format for the branch parameter: refs/tag/<tagname>. So to put all commits from /tags/KDE/4.4.0/kdelibs into the v4.4.0 tag in the kdelibs git repository the rule would be like this:
match /tags/KDE/4.4.0/kdelibs/ repository kdelibs branch refs/tags/v4.4.0 end match
For more examples see the svn2git/samples/ directory and the rules in the kde-ruleset repository.
TODO: Add some information how the recurse-stuff works.
You will need ~60GB (is that correct?) of disk space to get started, as the process requires a copy of the KDE svn database. There is a script that will download this for you (and which can be used to update it periodically using rsync) in kde-ruleset/bin/startSync. By default the startSync script runs rsync in "dry run" mode, so before using it to actually get the svn database edit the startSync script and remove the -n from both rsync lines.
more stuff goes here ...