Request for help adding Mercurial output to cvs2svn

Michael Haggerty mhagger at
Mon Feb 25 03:46:13 CST 2008

Alexis S. L. Carvalho wrote:
> Thus spake Alexis S. L. Carvalho:
>> An hg-fast-import is not so easy to write.  Some hg-specific problems
>> that would pop up:
>> - hg stores the file revisions in topological order (parents before
>>   children)
>> - there's a pointer from file revision to changelog revision (linkrev)
>> - auto-merging of .hgtags
>> It's certainly possible to solve these, but it won't be trivial.
> Well, things would get much easier if you add the constraint that files
> are sent to the importer right before the commit that uses them (which
> is pretty much what hg convert does).

cvs2svn could easily live with that.  We could even live without marks
entirely, always sending the full revision contents "inline" in the
command stream, if that would be easier for you.

The advantages of git-fast-import's use of marks is that (1) it is
faster to generate all of the file contents for one file at a time than
jumping around from file to file as commits are generated, and (2) the
marks can be reused, e.g., when multiple revisions have the same file
contents.  But neither of these advantages is critical.

For that matter, it is not critical that the hg stream format be the
same as git-fast-import's, as long as it is stable, well-documented, and
not terribly awkward to generate.  But then of course you would lose the
other advantages of a common format, like the ability to share tools.


More information about the Mercurial-devel mailing list