New converstion tool: svn2git.py

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Neil Schemenauer
Date: Wednesday, November 19, 2008 - 12:13 pm

Hi,

I'm working on a tool to do conversions from SVN to git using a SVN
dump.  It's in early development but perhaps some people would be
interested in it:

    http://python.ca/nas/python/svn2git.py

I would like to improve it so that it intelligently converts SVN
branches and tags into git branches (when possible).  The basic idea
is to map SVN paths into git branches, e.g. trunk -> master,
branches/foo -> branch-foo, tags/bar -> tags-bar.  Next, specific
SVN dump actions like:

    Node-path: branches/foo
    Node-kind: dir
    Node-action: add
    Node-copyfrom-rev: 3
    Node-copyfrom-path: trunk

need to be detected and the commit needs to performed with the
correct parent.  One complication is that SVN can create a branch or
tag from anywhere, for example, the action

    Node-path: tags/bar
    Node-kind: dir
    Node-action: add
    Node-copyfrom-rev: 3
    Node-copyfrom-path: trunk/subdir

would create tags/bar based on revision 3 of trunk/subdir.  There
doesn't seem to be a good way to convert that into git.  I was
thinking that the tags-bar branch in that case would have no parent.
Would git still efficently pack that or would you end up with extra
blobs?

  Neil
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
New converstion tool: svn2git.py, Neil Schemenauer, (Wed Nov 19, 12:13 pm)
Re: New converstion tool: svn2git.py, Kevin Menard, (Wed Nov 19, 12:39 pm)
Re: New converstion tool: svn2git.py, Neil Schemenauer, (Wed Nov 19, 1:40 pm)
Re: New converstion tool: svn2git.py, Daniel Barkalow, (Thu Nov 20, 11:49 am)