[PATCH 0 of 1] convert: better support for CVS branchpoints (issue1447)

Michael Haggerty mhagger at alum.mit.edu
Mon Jun 8 01:39:58 CDT 2009


Henrik Stuart wrote:
> This is the second attempt at introducing better branch point support,
> i.e. trying to solve issue 1447. However, as Michael Haggerty has
> pointed out [1], cvsps is inherently flawed in its conversion, and the
> more I try to patch it up, the more apparent this fact becomes.
> Unfortunately, the alternative, cvs2svn, does not easily accomodate
> CVSNT's extensions that I am fairly interested in.

It would be very easy to teach cvs2svn to honor CVS's commitids:

1. Teach the parser not to ignore these newphrases (as it does now).

2. Change the parser callback API to provide the commitids to the Sink
objects.

3. Change cvs2svn to include the commitid information in the metadata
hash (created by metadata_database.py:MetadataLogger.store()) when it is
available (otherwise storing None).  Ideally, this behavior would be
optional.

The net effect would be that cvs2svn would not allow file revisions with
differing commitids to be included in a single changeset.

(It would, of course, not guarantee that all revisions with the same
commitid *are* included in a single changeset, but that is what you want
because there might be other constraints inconsistent with the commitid
information.)

The reason I haven't bothered to implement this before is that (1) the
changeset generation seems to work pretty well without this extra
information, and (2) I was afraid that sometimes revisions within a
single commit might *not* have the same commitid, for example if a
commit was interrupted then resumed, or perhaps if some CVS clients
don't bother to ensure that all commits take place in the same CVS
"transaction".  But this is all just speculation; I don't have
experience using CVS commitids.

The reason that cvs2svn does not officially support CVSNT conversions is
that the file formats of CVSNT seem poorly documented and more fluid
than those of CVS, and that nobody with CVSNT experience and interest
has stepped forward to work on it.  Anyway, converting CVSNT
repositories seems usually to work, aside from commitids, mergepoints,
and the revision-specific file modes [1].

If you would like to improve cvs2svn in these directions, I would be
happy to help you get started.

BTW, I created a git mirror [2] of the trunk of cvs2svn to make it
easier for other people to work on patches for it.

Michael

[1] http://cvs2svn.tigris.org/faq.html#cvsnt
[2] http://repo.or.cz/w/cvs2svn.git


More information about the Mercurial-devel mailing list