问题描述
我正在尝试将CVS存储库转换为Merurial,但无法正常工作.
I'm trying to convert a CVS repository to mercurial but can't get it to work.
我从一个干净的结帐开始:
I start with a clean checkout:
cvs -d :sspi;username=xxx;hostname=yyy.local:/cvsrepos checkout repo
哪个工作正常
然后我做
hg convert .
但是失败了:
assuming destination .-hg
initializing destination .-hg repository
connecting to :sspi;username=xxx;hostname=yyy.local:/cvsrepos
abort: unexpected response from CVS server (expected "Valid-requests", but got 'E cvs [server aborted]: Root :sspi;username=xxx;hostname=yyy.local:/cvsrepos must be an absolute pathname\n')
我正在Windows 7上运行cvsnt
I'm running cvsnt on windows 7
修改:
对此进行了更多调查,似乎Mercurial启动了本地服务器cvs server
,然后与该实例进行通信,而不是与远程服务器进行通信.
Investigated this a bit more and it seems like mercurial starts a local server cvs server
and then communicates with that instance instead of the remote server.
我基于以下观察结果:
- 我创建了一个cvs.bat文件,该文件将命令行参数发送到文件.该文件显示参数"server".
- 进程监视器显示hg.exe试图打开文件
C:\cvstest\:sspi;username=xxx;hostname=yyy.local:\cvsrepos
当然会失败.
- I created a cvs.bat file that sends the command line arguments to a file. The file shows the argument "server".
- process monitor shows that hg.exe tries to open the file
C:\cvstest\:sspi;username=xxx;hostname=yyy.local:\cvsrepos
which of course fails.
是不是hg无法理解sspi连接字符串?
Can it be that hg does not understand the sspi connection string?
不是解决方案,但我找到了一种解决方法:将完整的远程存储库复制到我的计算机上,然后:
Not a solution but I found a workaround: Copy the complete remote repository to my machine and:
cvs -d :local:\localcopyofrepo checkout repo
hg convert repo
一切正常
推荐答案
好像错误消息告诉您使用存储库的绝对路径名,请尝试使用
Looks like the error message is telling you to use an absolute pathname to the repository, try using
hg convert <full_path_including_drive>
,而不是CVS存储库的已检出沙箱上的.
路径.您也可以尝试通过在命令convert
中添加-s cvs
来指定存储库类型,结果看起来像这样:
rather than the .
path on a checked out sandbox of your CVS repository. You could also try specifying the repository type in the convert
command by adding -s cvs
to the command, the result would look something like this:
hg convert -s cvs C:\sandbox\cvsrepos
这篇关于将cvs转换为mercurial的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!