Request for help adding Mercurial output to cvs2svn

Michael Haggerty mhagger at alum.mit.edu
Sun Feb 10 16:53:00 CST 2008


I am the main developer of cvs2svn [1], a Python program that can
convert CVS repositories to Subversion or to git while retaining all
project history.  I would like some help adding the ability to convert
from CVS to Mercurial.

cvs2svn is a very robust tool for one-time conversions from CVS to other
SCMs.  Aside from being able to handle just about every CVS repository
that we've ever seen, cvs2svn has very many customization options [2].
Now that Mercurial is reaching 1.0 status, I think it would benefit
greatly from having a very solid tool like cvs2svn to help people
migrate from CVS to Mercurial without fear of losing data.  (And I have
a bad conscience appearing to favor git over Mercurial :-) )

I have played with Mercurial a little bit but am no expert.  But I *am*
an expert in many bizarre aspects of CVS repositories and in cvs2svn.
Some months ago I added git output to cvs2svn.  It only took a day or
two of programming to get it to output data that can be read by the
git-fast-import tool [3].  I naively imagine that it should be a
comparable amount of work to add hg output.

I have some questions:

1. Is there a documented way of getting data into Mercurial, short of
creating a working directory and committing changesets one by one?

  - Most convenient would be dump file format that can be loaded into a
repository by Mercurial (analogous to those read by "svnadmin load" or
"git-fast-import").  If so, is this format documented?

  - Another alternative would be a Python API that could be used by
cvs2svn to get commits into a Mercurial repository efficiently,
including metadata (e.g., commit timestamps that are not equal to the
current time and authors not equal to the person running the
conversion).  If so, is it documented somewhere or is there example code
that uses this API?

2. What would be the natural, idiomatic way to represent CVS branches
and tags in Mercurial?

It would be wonderful if some Mercurial expert would volunteer to work
with me on this project, or at least discuss design issues before I get
started.

Michael

[1] http://cvs2svn.tigris.org
[2] http://cvs2svn.tigris.org/cvs2svn.html#intro
[3] http://cvs2svn.tigris.org/cvs2git.html


More information about the Mercurial-devel mailing list