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

Re: CVS -> SVN -> Git

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 15, 2007, 02:30 UTC
Message-ID
<20070715023035.GX4436@spearce.org>
In-Reply-To
<7154c5c60707141623s3f70e967s226e5da29965a173@mail.gmail.com>
David Frech <david@nimblemachines.com> wrote:
Show 11 quoted lines
> 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.
Previous: David FrechNext: Michael Haggerty
Message 15 of 31 in “CVS -> SVN -> Git”
  1. Julian PhillipsJul 13, 2007
  2. Michael HaggertyJul 13, 2007
  3. Martin LanghoffJul 14, 2007
  4. Michael HaggertyJul 14, 2007
  5. Chris ShoemakerJul 14, 2007
  6. Michael HaggertyJul 14, 2007
  7. Steffen ProhaskaJul 14, 2007
  8. Shawn O. PearceJul 15, 2007
  9. Eric S. RaymondJul 14, 2007
  10. Junio C HamanoJul 14, 2007
  11. Oswald BuddenhagenJul 14, 2007
  12. Michael HaggertyJul 14, 2007
  13. Karl FogelJul 14, 2007
  14. David FrechJul 14, 2007
  15. Shawn O. PearceJul 15, 2007
  16. Michael HaggertyJul 15, 2007
  17. Martin LanghoffJul 16, 2007
  18. Julian PhillipsJul 16, 2007
  19. Karl FogelJul 16, 2007
  20. Eric S. RaymondJul 15, 2007
  21. Michael HaggertyJul 15, 2007
  22. Eric S. RaymondJul 15, 2007
  23. Martin LanghoffJul 16, 2007
  24. Markus SchiltknechtJul 19, 2007
  25. Karl FogelJul 20, 2007
  26. Simon 'corecode' SchubertJul 19, 2007
  27. Markus SchiltknechtJul 20, 2007
  28. Scott LambJul 15, 2007
  29. Simon 'corecode' SchubertJul 19, 2007
  30. Simon 'corecode' SchubertJul 19, 2007
  31. Julian PhillipsJul 20, 2007

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.