old code repositories

Are the old code repositories still available somehow? The one before initial github commit

https://github.com/FreeCAD/FreeCAD/commit/120ca87015


The link provided in there does not work.

https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000

Screenshot_20200524_084619.png

Until a few years ago the SVN repository was accessible but now not any more.

What exactly are you looking for?

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.

Is this also possible with CVS? We used this VCS from the beginning until 2006.

Thus the idea came in mind to create a new git repository which has the old FreeCAD SVN and on top the git commits.

But what does this mean to all the git clones out there? Will this invalidate the master branch there?

It should not replace our master. Because the commit ids will change and as you stated it will probably break all forks.

I thought of a separate repo or branch or project (I do not know yet), which can be browsed and referenced from the forum.

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.

For the CVS repo I figured out that you can still run this:

cvs -z3 -d:pserver:anonymous@free-cad.cvs.sourceforge.net:/cvsroot/free-cad co -P .

A backup of the CVS files of the server can be done with:

rsync -av rsync://a.cvs.sourceforge.net/cvsroot/free-cad/\* cvs

So, to create a git repo out of the cvs you do (see also https://sourceforge.net/p/forge/documentation/CVS/):

cd /tmp
mkdir freecad
cd freecad

# backup
rsync -av rsync://a.cvs.sourceforge.net/cvsroot/free-cad/\* cvs

# Prepare git repo
mkdir freecad-git
cd freecad-git/
git init
cd ..

# Convert
cvs2git --blobfile=blob.dat --dumpfile=dump.dat \
  --username=FIXME --default-eol=native \
  --encoding=utf8 --encoding=latin1\
  --fallback-encoding=ascii\
  /tmp/freecad/cvs/

cat blob.dat dump.dat | git --git-dir=/tmp/freecad/freecad-git/.git fast-import
rm blob.dat dump.dat

Done!

Enter the git directory and check it out:

cd freecad-git
git checkout

Can you list the commands how to do it, please?

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.

cool commands werner. Worked like a charm. Furthermore I made one git repo out of it …

  • I was able to create the git repositories
  • push them to github
  • clone FreeCAD git
  • add cvs git and svn git as remotes
  • use git replace --graft to set the parant of the initial commit to the one before in git svn, same again for cvs
  • use git filter-branch – --all to rewrite all commits
  • force push back to github

https://github.com/berndhahnebach/3_gitgit

your first official commit werner
https://github.com/berndhahnebach/3_gitgit/commit/74f02b9d701aca3a4474fb76b2131ac6830be33f

From git to svn is without any problems
https://github.com/berndhahnebach/3_gitgit/commits/master?after=b881518872836ee603b69d7213448cf06040886c+21295

From svn to cvs seams some gap (4th of may to 17th of may)
https://github.com/berndhahnebach/3_gitgit/commits/master?after=b881518872836ee603b69d7213448cf06040886c+25935
especially this commit
https://github.com/berndhahnebach/3_gitgit/commit/7693c18eaa7ff13503386d2da5dd51d327428c0e

would you have a look werner … you might have some informations more …

Here we are all FreeCAD history in one repository …

https://github.com/berndhahnebach/All_FreeCAD

IMHO we should move this in a separate repo on FreeCAD github? What do others think?


Screenshot_20200603_075312.png

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.

https://github.com/berndhahnebach/All_FreeCAD/commits/newcsv
https://github.com/berndhahnebach/All_FreeCAD/commits/newsvncsv

What did I do?

  • set the authors email for csv and svn as well as git repo for the missing ones
  • splitt the first svn commit into several commits as it is huge and has file mode changes as well as line ending changes.

I don’t know if there is really a gap. Have you seen any file where there are sudden changes that do not appear in a change set?

IMO it’s sufficient to have a git repo that only includes the CVS and SVN commits but not the git commits of the master branch.

csv and svn in one git branch: https://github.com/berndhahnebach/All_FreeCAD/commits/newsvncsv last commit is first commit of FreeCAD github.



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.

@werner:

Do you think it is possible to get the informations of the commit release tags from the releases before 0.12 ? See https://wiki.freecadweb.org/History#Release_history

I would tag the in my All FreeCAD repository https://github.com/berndhahnebach/All_FreeCAD

found myself a start point for this. https://forum.freecadweb.org/viewtopic.php?f=8&t=23695#p184940

Amazing to see the whole story… Good job Bernd! We could put a copy of that on the FreeCAD Github, no?