Converting from CVSNT
Greg Ward
greg-hg at gerg.ca
Tue Jun 23 20:08:33 CDT 2009
On Tue, Jun 23, 2009 at 4:05 AM, Giampaolo Fadel<gp.fadel at gmail.com> wrote:
> I have some CVSNT repository that I want to convert to HG. (The server
> and the client are Windows XP).
> I used the convert extension and all work fine except two points:
> 1) The branches that in CVS are closed (merged to the main trunk), after
> the import, they are not closed and they generated new heads.
> This point is not important for me, my repositories are enough simple
> and I can manually rearrange the history.
What version of Mercurial are you using? There have been a number of
improvements to CVS conversion since 1.2. You might try the latest
development version (aka "crew" -- search the wiki for instructions).
In particular, hg convert now recognizes CVSNT's "mergepoints". If
your ,v files record where a merge happened, this might help you.
If not, you can always use the existing convert.cvsps.mergefrom config
setting. That existed in 1.2 and has not change significantly. "hg
help convert" for details.
> 2) All line of text files end with LF and not with CR LF.
> This point is more important because the source files after the import
> are, de facto, different.
That's probably because 1) CVS assumes everything is text unless told
otherwise, 2) CVS stores text files with LF in the repository,
regardless of what the client uses, and 3) Mercurial preserves the
data in the CVS repository byte-for-byte. (Disclaimer: all my
knowledge and experience is with CVS on Unix, not CVSNT. The very
idea that someone would use Windows as a server OS makes me shudder.)
You might want to look into the win32text extension. That will let
Mercurial continue to store text files using with LF, while making
your working copies readable to Windows.
Also, be warned that it's extremely difficult to convert a CVS
repository with branches or tags, and hg convert does not always get
it right. If you care about an accurate conversion of history, you
might want to look at a two-step process starting with cvs2svn.
Greg
More information about the Mercurial
mailing list