CVS conversion and branches

Greg Ward greg-hg at gerg.ca
Tue May 5 15:13:22 CDT 2009


On Mon, May 4, 2009 at 12:18 PM, David I. <yigyw4d02 at sneakemail.com> wrote:
> I am trying to convert a set of CVS modules to HG. It appears that the
> default branch is getting converted OK and doing a diff between the working
> directory of the HG and CVS repositories shows that everything is the same.
> I'm using this diff command on Linux to do the comparison:
>
> diff --exclude CVS -r dir1 dir2
>
> However, I'm having trouble with CVS branches. In one of our major modules,
> doing a diff between the HG and CVS working directories shows that there are
> differences on the latest (v6.0) branch. The differences appear to be
> consistent no matter what combination of "convert.hg.usebranchnames" and
> "--datesort" options I use. I haven't checked any other branches yet.

I'm surprised Michael Haggerty hasn't jumped in to point out that CVS
conversions based on cvsps, like Mercurial's, are inherently flawed
and doomed to failure.  (Michael is the maintainer of cvs2svn, so he
knows a thing or two about extracting useful info from CVS.)

The usual advice in such cases is to give cvs2svn a try.  Or rather,
use cvs2git (which is included with cvs2svn) to generate git
fastimport dumps, then load those into Mercurial with hg-fastimport.
The catch is that I have been hacking on hg-fastimport recently.  It
should be better than it was, but it's extremely bleeding edge.  It
passes its tests, but I have yet to try it on a real-world CVS repo
and the resulting fastimport dumps.

See http://www.selenic.com/mercurial/wiki/FastImportExtension for info
on hg-fastimport.

Greg


More information about the Mercurial mailing list