Request for help adding Mercurial output to cvs2svn
Michael Haggerty
mhagger at alum.mit.edu
Thu Feb 21 15:48:30 CST 2008
Frank Kingswood wrote:
> Michael Haggerty wrote:
>> 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.
>> [...]
>
> I think it would be useful if cvs2svn could generate output similar to
> what cvsps does, so that the built-in "hg convert" can use it. It's
> better to improve the built-in conversion than to add yet another
> external tool.
I spent some time looking into cvsps, and I don't think that its output
format, let alone the output itself, is suitable for industrial-strength
conversion from CVS. For example, as far as I can tell from my brief
investigation:
* log messages are not unambiguously separable from the metadata
* it seems to only allow a single tag per changeset
* it seems to only apply tags to single changesets, whereas in CVS files
can be added to a tag at different times.
* it's patch set creation seems to be pretty naive, too, leading to file
revisions being committed in the wrong order (e.g., 1.3 overwritten by 1.2).
* it seems to completely ignore a branch tag if no commits were ever
made on that branch.
* it seems to ignore the effect that a second import to a vendor branch
has on the main branch.
No wonder people have trouble when using cvsps-based conversion tools.
But the conversion results probably look tidy, since cvsps assumes away
most of the messy details of a real-life CVS repository :-)
> The optimal solution of course would be to integrate the hg export
> version of cvs2svn into the convert/cvs module.
I don't see how that would be practical, given that cvs2svn can also
convert to svn and to git. Am I to duplicate the code in three places?
Also, the convert module seems to have the idea of incremental
conversions hard-wired into it, whereas cvs2svn only supports one-time
conversions.
By the way, I imagine that the Mercurial community can already take
advantage of cvs2svn by converting to git and then from git to hg. I
just released cvs2svn 2.1, which is the first official release of
cvs2svn that supports conversion to git. More info here:
http://cvs2svn.tigris.org
Michael
More information about the Mercurial-devel
mailing list