* New converstion tool: svn2git.py
@ 2008-11-19 19:13 Neil Schemenauer
2008-11-19 19:39 ` Kevin Menard
2008-11-20 18:49 ` Daniel Barkalow
0 siblings, 2 replies; 4+ messages in thread
From: Neil Schemenauer @ 2008-11-19 19:13 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: New converstion tool: svn2git.py
2008-11-19 19:13 New converstion tool: svn2git.py Neil Schemenauer
@ 2008-11-19 19:39 ` Kevin Menard
2008-11-19 20:40 ` Neil Schemenauer
2008-11-20 18:49 ` Daniel Barkalow
1 sibling, 1 reply; 4+ messages in thread
From: Kevin Menard @ 2008-11-19 19:39 UTC (permalink / raw)
To: Neil Schemenauer; +Cc: git
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: New converstion tool: svn2git.py
2008-11-19 19:39 ` Kevin Menard
@ 2008-11-19 20:40 ` Neil Schemenauer
0 siblings, 0 replies; 4+ messages in thread
From: Neil Schemenauer @ 2008-11-19 20:40 UTC (permalink / raw)
To: Kevin Menard; +Cc: git
On Wed, Nov 19, 2008 at 02:39:26PM -0500, Kevin Menard wrote:
> You may want to look at this Ruby implementation for more ideas:
>
> http://github.com/nirvdrum/svn2git/
>
Hi Kevin,
Thanks for the link. I see that git-svn does most of the heavy
lifting and now I see that it does try to intelligently handle
branches and tags by looking for a suitable parent commit. I will
have to look closer at what it's doing. Maybe it is sufficient for
my task.
Regards,
Neil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: New converstion tool: svn2git.py
2008-11-19 19:13 New converstion tool: svn2git.py Neil Schemenauer
2008-11-19 19:39 ` Kevin Menard
@ 2008-11-20 18:49 ` Daniel Barkalow
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Barkalow @ 2008-11-20 18:49 UTC (permalink / raw)
To: Neil Schemenauer; +Cc: git
On Wed, 19 Nov 2008, Neil Schemenauer 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.
Probably the best thing in git would be to have the parent of the initial
commit on that branch be revision 3 of trunk; it will look like a big
rename of everything from subdir/* into the project root directory, which
is essentially what happened.
> Would git still efficently pack that or would you end up with extra
> blobs?
git will only ever store a single copy of identical file contents,
regardless of anything at all. Furthermore, when making a pack, git
compresses everything in the pack against everything else in the pack. Its
heuristics also ignore the leading directory names in guessing which blobs
are likely to help in compression (because there's a good chance that
anything named "Makefile" anywhere is useful in compressing anything else
named "Makefile").
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-20 18:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19 19:13 New converstion tool: svn2git.py Neil Schemenauer
2008-11-19 19:39 ` Kevin Menard
2008-11-19 20:40 ` Neil Schemenauer
2008-11-20 18:49 ` Daniel Barkalow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox