VCS Interoperability

David Barr
Jan 20, 2012

git & Subversion

Scratching one's itch

Project at $JOB, March 2010 — 5 years, 22000 commits, 2.8GB

Complete and timely conversion impossible!

Sufficiently numerous anecdotes are data

Maybe it's not just my repository?

Reached out to the git community for anecdotes

Came with a proposal in hand

Saved the world in less than 30 days

Jokes, lol

OK, so it was hard. Why?

Mapping Subversion history to git DAG non-trivial

So what was the proposal?

Translator — Subversion dump to git fast-import

Data structure that maps between them and scales linearly

Independent of both projects

Merged svn-dump-fast-export into git-contrib as svn-fe

Sounds easy, why more than 30 days?

Although it 'uses only timeless fs concepts', verbs in Subversion dump format not clearly defined.

The obvious one was delete, the rest full of surprises.

Thus began a 3 month protocol reverse-engineering effort.

So we have a translator, how is it fed?

Extracting complete history from Subversion server is hard.

For large repositories, ask for a compressed dump.

Enter svnrdump, the product of Ram's GSoC 2010 project.

svnrdump — Google Summer of Code 2010

Ramkumar Ramachandra

Any issues with git fast-import?

Protocol extensions for bi-directional communication

Complexity can be removed from the translator.

Applying Subversion binary deltas becomes straightforward.

git-remote-svn — Google Summer of Code 2011

Dmitry Ivankov

remote-helper improvements

Sverre Rabbelier, Jeff King, et al.

In parallel to all this work, there were many improvements to the remote helper infrastructure which would ultimately be used to integrate the translator into the natural git flow.

Jérémie Nikaes' git-remote-mediawiki helped spur things along.

Future work

Merge outstanding GSoC patches into git-core

Upstream vcs-svn from git-core to svn-dump-fast-export

Implement fast-import protocol extensions for hg or bzr

Reverse translator to enable writing to Subversion

Integrate svn-dump-fast-export with hg or bzr

Questions & Answers

Thank you

For more information or to get involved email and consider cc'ing

Git Logo and Icon by Dylan Beattie distributed under Creative Commons Attribution-ShareAlike 3.0 Unported License.