Differences between revisions 10 and 11
Revision 10 as of 2008-11-04 17:32:49
Size: 3845
Comment:
Revision 11 as of 2009-01-08 15:42:53
Size: 3955
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:

See also http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/projects/git-guide/notes.mdwn?op=file&rev=0&sc=0

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

See also http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/projects/git-guide/notes.mdwn?op=file&rev=0&sc=0

Checkout the scripts (after installing python-debian, git-buildpackage and pristine-tar):

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).

Shell script generation approach

See http://lists.debian.org/debian-ocaml-maint/2008/07/msg00028.html

Many repositories below have been converted using a generated shell script. For now, the generated scripts and related files are in my (glondu-guest) home on alioth, in svn2git-migration-files directory. -- StephaneGlondu ?DateTime(2008-08-09T15:04:46Z)

Progress

The following converted repositories have been adopted:

Proposals: