App-SnerpVortex
view release on metacpan or search on metacpan
About
Snerp Vortex is an anagram of SVN Exporter. It aims to be a faster, more
reliable way to create new repositories from Subversion dumps than using
git-svn and/or various abandonment techniques.
Faster? On my canonical example repository (POE), Snerp Vortex converts
2824 Subversion commits to Git in under 300 seconds.
Not fast enough? The conversion happens in about 100 seconds if we
remove Git's porcelain from the equation. So there's a lot of room for
improvement, perhaps by switching to git-fast-import. I'm looking for
someone who wants to help port it over.
More satisfying? Snerp Vortex uses path analysis to detect hints about
tags and branches. It then adjusts its assumptions according to actual
repository use. Tags that are modified later become branches. Branches
that are never touched are demoted to tags.
Snerp Vortex gains some benefits by doing tag and branch analysis before
converting the repository:
* Tag and branch analyses can be examined by a human without
converting the repository. The snassign-gui utility graphically
browses the repository structure over time.
* Analysis errors can be fixed and redone quickly without waiting for
lengthy repository conversions each time.
* Tagging and branching are performed as "git tag" and "git branch" at
appropriate times. It's faster and smaller than duplicating
directory trees and converting them later.
There is rudimentary support for multiple projects per repository, but
it needs love.
Toolset
Snerp Vortex is a chain of multiple tools.
snanalyze
snanalyze examines a Subversion dump and produces a SQLite database
that describes its structure over time. snanalyze is intended to be
run first, as most other utilities require the SQLite database to
work.
snassign-auto
snassing-auto attemtps to automaically assign tags and branches
based on directory locations and usage patterns. It's generally run
after snanalyze and before snassign-gui.
snassign-gui
snassign-gui is a Gtk2 utility to browse a repository analysis. With
it, one can page back and forth through significant revisions to see
how snassign-auto interpreted structural changes.
Some repositories will be too complex for snassign-auto to be
successful. We hope a motivated individual will update snassign-gui
to be a tag/branch assignment editor so humans can override the
automatic assignment.
snassign-gui is intended to be used to verify that snassign-auto
worked correctly, before a possibly lengthy snerp run.
snerp
When everything is ready, snerp is called to export the Subversion
dump. It takes as input the Subversion dump, and the index database
containing final tag and branch assignments. It produces a new copy
of the repository in the desired format.
Getting Subversion Dumps
Snerp Vortex requires a Subversion dump file, which is generally created
by running svnadmin dump on a local repository.
There's also a remote svn dump utility that may help, but we haven't
tried it: http://rsvndump.sourceforge.net/
Other Included Utilities
Snerp Vortex comes with some utilities and scripts that will eventually
be cleaned up and organized. Until then:
mkramdisk_osx
Create a 1 GB RAM disk with a case-sensitive filesystem. Extremely
useful for Macintosh machines that use case-insensitive filesystems
by default.
snub
Snub the file contents of a dump. Retains the file and directory
structure, but the resulting dump and replays are much smaller.
Written for Ãvar Arnfjörð Bjarmason's six-gigabyte dump, which
triggers a hard to reproduce bug.
diff-test
Performs a recursive diff, excluding some things that Subversion may
have that another VCS may not. For example, expanded "$Id$" tags.
Useful for testing the results of a replay, although it won't test
intermediate revisions... only the final ones.
Development Scripts
Other development and/or test scripts are included in the distribution
but are neither installed nor documented here. Browse around!
OSX Users
Get yourselves a case-sensitive filesystem. This is easier done than
said. Disk Utility can create empty random-access disk images with the
filesystems of your choice. They mount in /Volumes and are accessible
like any other filesystem.
Even better, build a RAM disk if you have the memory to spare. See the
mkramdisk_osx utility in this project.
Improvements?
I've heard that git-fast-import can potentially make Snerp Vortex a lot
faster. The program should be flexible enough to support it without much
fuss.
I may not get around to it, as I'm rapidly running out of Subversion
repositories to convert. If you want or need this, please consider
contributing.
Testing
Until there's a proper test framework, here's the plan from a recent
( run in 0.539 second using v1.01-cache-2.11-cpan-39bf76dae61 )