I’ve tried all the recommended conversion techniques
Mostly they manage to get the latest version of the files right, but every one of them trashes my history. Many (most?) of the tags from my cvs project have at least one file in error when I run “hg up $tag”
My cvs repo is not all that complicated. Why can’t anything convert it?
I’d like to dump cvs and convert to mercurial, but not without history.
To recap my frustration:
I tried hg convert
(tried –branchsort,–timesort, fuzz=0)
I tried cvs2svn and then hg convert.
tailor does not work with recent versions of mercurial
fromcvs disappeared from the face of the earth
hg-cvs-import has been abandoned for 4 years and doesn’t work with recent versions of hg
I have tried using the two most recent versions of mercurial ( 1.5 and 1.5.1 ).
I realize now that there are certain fundamental incompatibilities between cvs tags and hg tags.
In cvs, a version of a file have tags associated with its different versions.
In hg, a version is an alias for a changeset . In other words the state of the working files at some snapshot in time
The distinction is subtle, but important.
It is possible to make a tagged release in cvs of a version that does not represent a snapshot in time. This is not possible in hg.
Of course one could apply patches to get replicas. However, this would create a lot of new heads on the repository with arguably little benefit (assuming the cvs repo is still kept around for posterity).
I’m afraid a perfect conversion from cvs to mercurial is not practical. Ry4an’s solution would work for those who care only about recreating the versions. I am more interested in the history and evolution of the source files.
I wrote the following script to simply munge all the cvs tags in the $CVSROOT prior to the conversion. e.g tag “v321” becomes “v321_prehg”. That way developers will know those tags are not-authoritative and they must go back to the read-only cvs tree.