cvs synthetic branchpoint commits (was Re: cvsps wrapper script on mercurial@)

Greg Ward greg-hg at gerg.ca
Wed Sep 30 15:45:24 CDT 2009


On Tue, Sep 29, 2009 at 9:33 AM, John Hein <jhein at timing.com> wrote:
>  > It may be a reasonable goal to make convert do the right thing on these
>  > non-branched files on a branch.
>
> Do you have any good ideas for work to make non-branched files work?
>
> I tried to insert some code in cvs.py that generated a synthesized
> commit for each 'branchpoint'.  The synthesized commit, call it C, had
> as parents all the changesets that were marked as having the same
> branchpoint.  I was hoping that setting up the right parent/child
> relationship would just let the later toposort "do the right thing".

Careful: if you get serious here, you are going to end up reinventing
cvs2svn, which is 20,000 lines of pretty complex code.  Trying to get
sane information out of CVS is a very difficult job, and AFAIK only
cvs2svn has so far got it right.

I started down the same road that you are starting on now and wasted
several weeks improving Mercurial's CVS conversion.  Then I saw the
light and decided to bolt a Mercurial backend on to cvs2svn instead,
and have been much happier since then.  It works.

Greg



More information about the Mercurial-devel mailing list