{"thread":{"id":"19743","subject":"Yet another SVN to git conversion tool","startedAt":"2009-06-08T14:32:15Z","lastAt":"2009-06-08T14:32:15Z","messageCount":1,"participants":["Jan Holesovsky"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"115809","messageId":"200906081632.15343.kendy@suse.cz","threadId":"19743","inReplyTo":null,"subject":"Yet another SVN to git conversion tool","fromName":"Jan Holesovsky","fromEmail":"kendy@suse.cz","sentAt":"2009-06-08T14:32:15Z","receivedAt":"2009-06-08T14:32:15Z","isPatch":false,"sender":{"key":"kendy@suse.cz","avatar":null},"body":"Hi,\n\nRecently I needed to convert the Gnome ooo-build repository from the Gnome SVN \nto git [1], and also create a regularly updated git mirror of the \nOpenOffice.org SVN repository [2].  Unfortunately I did not find a tool that \nwould suffice my needs - git-svn was unable to handle more branches, and \nhttp://repo.or.cz/w/svn-all-fast-export.git had a Qt4 dependency that made it \nproblematic to even compile, not to mention the syntax of the repository \ndescription file(s) that I did not really understand - so I decided to create \na new tool based on svn-fast-export.c [3]:\n\nhttp://cgit.freedesktop.org/ooo-build/contrib/svn-to-git\n\nI made it for our needs, so there is just a simple Makefile, the code might be \nhacky here and there [and is C++ ;-)], but it seems to work really well - at \nleast for us [4] :-)\n\nFeatures:\n\n- perfect import of trunk (master), branches and tags\n  - even when you svn cp things around like\n    svn cp branches/blah/bleh trunk/foo/bar\n  - when there are commits to the tags\n\n- change login names to real names and email addresses\n\n- converts ChangeLog-like commit messages to git-like (optionally)\n\n- allows you to split one SVN tree to multiple git trees\n  - based on regexps\n\n- allows you to convert leading tabs to spaces in files you choose\n  - (fixes a terrible pain in the OOo sources where tab is set to 4 spaces,\n    and leading tabs and spaces are combined in nearly every source file!)\n\n- allows you to ignore broken tags/commits\n\n- and is really fast\n  - the OOo SVN with ~270000 commits in < 1hr on the right H/W ;-)\n\nDocumentation is a bit lacking, but basically you need to create one file \ncontaining the description of the repositories, and one with the names/emails \nof the svn login names, and you are ready to start ./svn-to-git.sh.  \nDescription files I used for the ooo-build and OOo conversions are included.\n\nSo - if you are interested, and have a SVN repository to convert, give it a \ntry.  And if you have patches, please send them to me :-)\n\nRegards,\nKendy\n\n[1] http://cgit.freedesktop.org/ooo-build/ooo-build\n[2] http://cgit.freedesktop.org/ooo-build except ooo-build, website and \ncontrib/\n[3] from http://repo.or.cz/w/fast-export.git\n[4] http://www.go-oo.org\n"}]}