Conversion script
This is a svn2git migration adapted for our svn layout available [http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/tools/svn2git/glondu_svn2git.py?op=file&rev=0&sc=1 there].
Quick guide
Checkout the scripts:
svn checkout svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/tools/svn2git svn checkout svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/projects/git-guide
Put glondu_svn2git.py and new-d-o-m-git-repo in your path. Then go to an empty directory and execute:
glondu_svn2git.py -p <package> -t <upstream-name>
<package>: the package name. The script will checkout svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/<package>.
<upstream-name>: the name of the directory with upstream tarballs (usually upstream or tarballs).
Check the result (for example, with gitk), and if you are satisfied, push it to alioth (run this command from the repos directory):
new-d-o-m-git-repo <package>
Remarks
The script does many checks in the process and should fail in any situation that I (StephaneGlondu) don't expect. Many cases are not handled, but the script should be easily debugged and adapted for simple packages. Since it is self contained and uses only basic commands, it should be easily adapted to whatever processing we would like to do on the fly.
Some caveats and possible future improvements:
- The mapping from alioth logins to full names is hard-coded in the script.
- File renamings/movings might be seen as deletions/creations (with all drawbacks)... but I don't know if svn itself tracks such modifications differently. Anyway, git-import-orig should have the same behaviour (I've mimicked its algorithm).
- In tag names, "~" are not allowed... they are currently replaced with "." (which is the behaviour of git-import-orig).
Progress
FYI, the script above successfully generated the following repositories:
http://git.debian.org/?p=users/glondu-guest/test/ocaml-csv.git
http://git.debian.org/?p=users/glondu-guest/test/ocaml-sqlite3.git
For OCaml, since the packaging history was quite complex (branches, merges, merges from other parts of the svn tree, tags in various simultaneous branches, evolving layout since 2003), a shell script has been generated using the script above, and then manually tweaked.
The following converted repositories have been adopted:
http://git.debian.org/?p=pkg-ocaml-maint/packages/approx.git
http://git.debian.org/?p=pkg-ocaml-maint/packages/ocsigen.git
Proposals: