git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: New converstion tool: svn2git.py

From
Kevin Menard <nirvdrum@gmail.com>
Date
Nov 19, 2008, 19:39 UTC
Message-ID
<7e3605160811191139t34c5de7q1912475f778386e8@mail.gmail.com>
In-Reply-To
<20081119191320.GA20870@arctrix.com>
Hi Neil,
You may want to look at this Ruby implementation for more ideas:
http://github.com/nirvdrum/svn2git/

I forked it from a project originally by James Coglan, but should be able to answer most questions about it.

-- 
Kevin



On Wed, Nov 19, 2008 at 2:13 PM, Neil Schemenauer <nas@arctrix.com> wrote:
> 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: Neil SchemenauerNext: Neil Schemenauer
Message 2 of 4 in “New converstion tool: svn2git.py”
  1. Neil SchemenauerNov 19, 2008
  2. Kevin MenardNov 19, 2008
  3. Neil SchemenauerNov 19, 2008
  4. Daniel BarkalowNov 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.