Thread (27 messages) flat view 27 messages, 12 authors, 2016-06-15

Re: CVS -> SVN -> Git

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:43:21

David Frech [off-list ref] wrote:
Now I want to switch to git. I've since added enough to svn that there
is no option but to use th svn repo as my source. git-svnimport
doesn't work for me because its idea of the structure of my repo is
too limited. I looked around, stumbled over fast-import, and got
hooked on the idea of using it. It seemed simple enough... I wrote a
350-line Lua (!!) program that parses the svn dump file and creates a
commit stream for fast-import.

It took a day and half to get the svn dump parsing right (it's an
egregiously bad format) but only a couple of hours to write the
fast-import backend.
With the 'C' (copy) and 'R' (rename) operators in fast-import I was
starting to suspect that an SVN dump->fast-import stream translator
wasn't going to be that complex.

I wouldn't want to attempt to parse the SVN dump format directly
in fast-import.  As you said the format is horribly difficult
to read.  The entire fast-import stream parser is only 624 lines
of C (the other 1,636 lines of fast-import are for documentation,
the in memory tree/branch management and packfile generation).
I doubt the SVN dump file can be parsed in as few lines of C code.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help