[RFC] two improvements to mercurial

Emmanuel Mogenet mgix at mgix.com
Mon Aug 29 20:28:57 CDT 2005


Jordan Breeding wrote:

>
> 2) The other idea I have I am going to start implementing within the  
> next week or two.  The idea is to have better support for converting  
> cvs to mercurial.  Currently one can try to use tailor but I have not  
> had the greatest experience while trying to get tailor 0.99 working.   
> The cvs import script from git seems to work much better.  So my idea  
> is this: change the name of the current convert-repo script to  
> convert-git-repo, then come up with two new scripts convert-cvs-repo  
> and convert-cvs-branch.  convert-cvs-branch will take a cvs branch  
> and convert it into a mercurial repo, it will support incermental  
> imports.  convert-cvs-repo will take an entire cvs repo and a  
> directory name, it will then use that directory as a container for  
> for several mercurial repos (trunk, branch1, branch2), it will also  
> support incremental conversions.
>

I also had a bad experience with taylor. I think there is A Better Way (tm).

If you're looking into this, I'd suggest taking a look at a perl script 
(I know, I know,
but I was in a hurry, and I don't master python well enough yet) I wrote 
a while back
to convert from CVS to hg.

You can get it here : http://www.mgix.com/cvs2hg.tar.bz2

It is horribly slow as it goes at it in a very naive way, but it 
basically gets
the job done. It's quite useful if your plan is to migrate once and for 
all away
from CVS (which was my case).

One thing I did in cvs2hg is to import the cvs revisions changeset by 
changeset.
It is not easy to bundle up all cvs changes into coherent changeset, but 
there is
an open source tool that does the job pretty well : cvs2cl the changelog
generator (http://www.red-bean.com/cvs2cl/)

cvs2hg actually relies on cvs2cl to extract meaningful changeset out of 
the cvs history.

Hope this helps,

    - Emmanuel





More information about the Mercurial mailing list