Google Summer of Code Proposal - Conversion Tools

Patrick Mézard pmezard at
Sun Mar 30 11:00:49 CDT 2008

Christopher Brown a écrit :
> Hello to the Mercurial devoted!
> I'm taking up the suggestion of the GSoC project idea #1.8: that of
> refining the conversion tools for migration to Mercurial from CVS,
> Subversion, etc.
> My proposal can be found here:
> Feedback is appreciated, and I look forward to working with you guys
> over the summer!

The situation highly depends on the source type and what you really expect from the conversion. Use cases vary from one-shot conversions to incremental daily ones. In the first case, you want to be lossless and do not really care about raw performance. In the second, you usually deal with a single branch, do not really care about tags or metadata, but you want it to work incrementally and quickly. It's hard to have both with centralized VCSes.

The convert extension supports incremental conversion usually at the price of correctness. Here is a short summary of the available sources and some hints about the work which can be done.

I wraps the cvsps tool and inherit its qualities and defects. Several proposals were made recently to replace it with native python versions (see devel "[PATCH] Add built-in cvsps equivalent" thread). IMHO, it would be better to help existing projects (cvsps or others), CVS conversion being notoriously difficult to deal with.

Another possibility is to improve one-shot conversions with cvs2svn (see devel thread "Request for help adding Mercurial output to cvs2svn"). IIRC, a fast-import format was added to cvs2svn for consumption by other tools. Supporting this may be good since cvs2svn is dedicated to one-shot lossless conversion.

That's a handmade converter built on top of svn python bindings. It's not lossless but good enough with "sane" svn repositories, and fast enough when run incrementally. It also supports partial conversions which is good for interoperability with an upstream source. Focus is currently on pushing changes back to subversion (with rebasing support).

The converter runs fine but I suspect it's lossy. I hardly believe converted Mercurial repositories can be smaller than fully packed Git sources. I would be happy to hear knowledgeable people about this.

it's mostly broken, see the issue tracker for details

GNU Arch and Monotone
Preliminary support, like "it worked on my own repository". This is a good thing especially it's backed by tests but do not expect too much from these. For instance, the Monotone converter cannot convert the official Monotone repository, but works well with others.

I hope it helps you to decide what you want to work on.

Patrick Mézard

More information about the Mercurial mailing list