tags:

views:

439

answers:

3

I’m trying to convert an existing Windows CVS repository to Mercurial and getting the following response and error:

C:\Windows\system32>hg convert c:\users\jeff\webs\shelter-cvs\shelter

assuming destination shelter-hg
initializing destination shelter-hg repository
connecting to :local:c:\cvs
abort: unexpected response from CVS server (expected "Valid-requests", but got 'E cvs [server aborted]: c:\\cvs: no such repository\n')

Here’s the background:

  • The repository was created with TortoiseCVS so I believe it’s actually cvsnt.

  • I can properly checkout from the
    repository using either the command
    line or the TortoiseCVS gui, so I
    think it is set up correctly.

  • I'm trying to convert a working copy, not the repository itself

  • I’m running Windows 7, 64-bit

  • I’ve installed TortoiseHG and enabled the convert extension.

+1  A: 

Author said:

I'm trying to convert a working copy, not the repository itself

That makes what you're doing not possible. You need access to the repo, not to a checkout of it. CVS checkouts (unlike mercurial checkouts) don't include full history. The best you can do with just a checkout is to import a snapshot or two.

Ry4an
I thought that I needed to run convert on a checkout, not the repository in order to convert cvs to mercurial. I DO have access to the repository. It's located at c:\cvs\shelter, but when I modify the convert command to: hg convert c:\cvs\shelterI get the error: No such file or directory: c:\cvs\shelter\CVS\Root.
jalperin
A: 

I am in the process of doing exactly what you are trying to do. I assume you have installed cvsps and configured the convert extension in your .hgrc correctly?

Your command though for conversion is likely the problem. You are specifying the path to the module you want to convert, not the module name itself.

Try the following:

c: cd \users\jeff\webs\shelter-cvs\ hg convert shelter

The above will create the Hg repository as "shelter-hg". You could alternatively specify where you'd like to have the Hg repository go with:

cd \users\jeff\webs mdir hg_repo cd shelter-cvs hg convert shelter ..\hg_repo\shelter

Hope this helps,

mG.

mobiGeek
still doesn't work for me; I get exactly the same "no such repository" error which doesn't seem to make sense. I did a fresh checkout from the repository, which worked, so it clearly exists!I checked out to c:\users\jeff\desktop where it created the directory 'shelter.' Then I did: cd c:\users\jeff\desktop\shelter. Then I ran: hg convert shelter and it gave the error. If I first switch into c:\users\jeff\desktop\shelter and then execute the hg convert command, it says 'shelter doesn't look like dvs checkout.'
jalperin
Did you test to see if the cvsps command works? I had to fudge with it for a bit before hg convert would work, since hg convert depends on cvsps.I think you want to first CD to c:\users\jeff\desktop, then try "cvsps shelter". If it works, it should start spitting out the commit history for the shelter module. If not, then hg convert won't work.Additionally, I think you should be running the "hg convert shelter" command also from the "desktop" directory, not from within the shelter directory.
mobiGeek
hmm. cvsps command not working, so I guess it's not installed in windows. I did install it in cygwin, but when I cd /cygdrive/c/users/jeff/desktop and then cvsps shelter, I get: 'cannot determine CVSROOT.'
jalperin
BTW: I've moved away from "hg convert" and am on to "cvs2hg". http://vc.gerg.ca/hg/cvs2svn/file/tip/README.cvs2hgAn interesting thread in the Hg mail list on recent conversion efforts: http://selenic.com/pipermail/mercurial/2010-January/029668.html
mobiGeek
Also note that CVS is not CVSNT. If you have been using CVSNT, you'll need to stick with CVSNT tools.
mobiGeek
A: 

I had a similar problem, and resolved it by changing the CVSROOT (environment variable) from a local folder to using :pserver, like this:

:pserver:username@computername:/CVS

This works on CVSNT, or at least it did for me.

Ola Eldøy