Lately I imported a SVN into git, which is not difficault. Thus the idea came in mind to create a new git repository which has the old FreeCAD SVN and on top the git commits. Just for historical reason to be able to browse and reference the development before 2011.
Never did that but it seams possible too. https://git-scm.com/docs/git-cvsimport Would be cool to have a git repo for browsing freecad code right from the beginning.
With https://www.journaldev.com/10618/svn-to-git-migration-complete-tutorial I found a good tutorial how to migrate a SVN repo to git.
As said above the SVN repo is not accessible any more on Sourceforge but luckily Jürgen once made a backup of the files on the server and put them to the download section on Sourceforge (where it has been removed in the meantime).
Long story short – I saved the file years ago and uploaded it to Dropbox today. Here is the link
Unzip the file and put the content e.g. to /tmp/freecad/svn. There you will have the directory /tmp/freecad/svn/SVN-FreeCAD_2006-2012/. To do the migration perform these steps:
cd /tmp/freecad
mkdir git
cd git
# get list of contributors
svn log -q file:///tmp/freecad/svn/SVN-FreeCAD_2006-2012/ | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors.txt
# get initial revision number -> r1
svn log --stop-on-copy -q file:///tmp/freecad/svn/SVN-FreeCAD_2006-2012/ | less
# now perform the actual migration (takes 10-15 minutes)
git svn clone -r1:HEAD --no-minimize-url --stdlayout --no-metadata --authors-file authors.txt file:///tmp/freecad/svn/SVN-FreeCAD_2006-2012/
# this creates a new sub-directory SVN-FreeCAD_2006-2012
cd SVN-FreeCAD_2006-2012
# Done
git branch -a
An alternative way to migrate to git is:
cd /tmp/freecad
mkdir git
cd git
# get list of contributors
svn log -q file:///tmp/freecad/svn/SVN-FreeCAD_2006-2012/ | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors.txt
# now perform the actual migration (takes 10-15 minutes)
svn2git file:///tmp/freecad/svn/SVN-FreeCAD_2006-2012/ --authors authors.txt --revision 1
In the tutorial it’s said that this is the preferred method because it is able to migrate tags, too. However, IIRC we never created tags in the old SVN repo but only branches and for me this method stops with an error:
svn2git warning: Tracking remote SVN branches is deprecated.
In a future release local branches will be created without tracking.
If you must resync your branches, run: svn2git --rebase
command failed:
git checkout “CMake_port”
When I try svn2git --rebase it raises the same error again.
The interesting points happen on 10 Oct 2011 and on 17 May 2006 Not easy to post a link as this changes if new commits will merged. For fast viewing on the move from cvs to svn and svn to git see the branches newcvs and newsvncvs they both have the first commit of the next version controll system on top.
You are right werner, no gap, just to many mixed changes. Thus it looked like a gap. I optimized history of the first few commits of svn repo. See https://github.com/berndhahnebach/All_FreeCAD/commits/newcsv The last commit is the first real commit in svn repository. All what happened after last csv commit and this real code change commit is splitted into the four commits befor the last.