CVS command returns error

Michael Giroux mlgiroux@gmail.com
Wed Apr 12 22:56:00 GMT 2006


Igor,
Thanks for the very complete answer.  I had not considered the fact that 
there were two separate builds for windows and cygwin.  Based on this, 
it seems that the correct solution is to set my PATH so that the windows 
version of CVS is in the PATH prior to cygwin version

I suspect that your explanation about the file path is related some how, 
but there are a detail that might apply.

WRT the error message
 >> cvs server: cannot open directory /cvsroot/howl/howl/logger
The path is the path on the remote server.  This comes from the cvs login:
cvs -d:pserver:anonymous@cvs.forge.objectweb.org:/cvsroot/howl login

The remote cvs root is /cvsroot/howl and the module is howl/logger 
resulting in a request to access something on the remote system in 
/cvsroot/howl/howl/logger

The local system (cvs client) location for this project is 
e:\workspace\logger\ (the location I did the co into.)

WRT the mount
 > mount -s 'c:\cvsroot' /cvsroot

Based on everything you have suggested, I'm starting to think that the 
problem has to do with the fact that the project was checked out using 
the windows version of cvs client, and something in the project 
structure is throwing the cygwin version of the client off.

I guess this really isn't that important since I do have a workaround. 
Unless you (or anyone else) has a compelling desire to rationalize what 
else might be going on, I'll leave it here.

Thanks for the help.

Michael





Igor Peshansky wrote:
> On Wed, 12 Apr 2006, Michael Giroux wrote:
> 
>> The CVS related ANT tasks require that the cvs executable is on the PATH.
>>
>> I have two versions of cvs installed,
>> one is at c:\bin\cvs\cvs.exe
>> The other at c:\cygwin\bin\cvs.exe
> 
> I'm assuming the former is a Windows build of cvs.
> 
>> Both versions show the same version information:
>> Concurrent Versions System (CVS) 1.11.20 (client)
>>
>> When I attempt to execute the target that contains <cvschangelog> using the
>> cygwin copy of cvs, I get the following error:
>> cvs server: cannot open directory /cvsroot/howl/howl/logger
>                                     ^^^^^^^^^^^^^^^^^^^^^^^^^
> There's your problem.  Cygwin's cvs will interpret this as an absolute
> POSIX path, and will try to find it relative to the root ("/") mount
> (unless you have a specific mount for that directory).  So, by default,
> it'll look in c:\cygwin\cvsroot\howl\howl\logger (which, I'm guessing,
> doesn't exist).  

Correct, it does not exist.

> Whereas the Windows build of cvs (even though it reports
> the same version) will treat the above path as a Win32 path (which will be
> relative to the current drive, BTW), so it'll look (again, by default) in
> c:\cvsroot\howl\howl\logger (which, I presume, exists).

No, this does not exist either.

> 
>> When I execute using the version in my c:\bin\cvs directory, the task
>> runs successfully.  So while these two versions of CVS appear to be the
>> same version, they certainly do not work identically.
> 
> They are the same version of CVS built for different platforms.  Of course
> they won't work identically.
> 
> FWIW, the only way you can be sure two executables will work identically
> in every circumstance (apart from actually trying them) is if they are
> exactly the same bit-by-bit.
> 
>> Is anyone aware of any issues with the cygwin version of cvs command?
> 
> No issues -- the behavior you're getting is expected.
> 
>> Any tricks to using it with <cvs*> ant tasks?
> 
> You can make sure Cygwin's cvs looks for that directory in the same place
> as the Windows cvs by mounting the directory appropriately.  I suggest
> issuing the following command at the Cygwin prompt:
> 
> mount -s 'c:\cvsroot' /cvsroot
> 
> Once that's done, your Cygwin cvs should work properly *for that
> repository*.
> 
>> I did not see that I could specify a nested search path in the <cvs>
>> commands. Is there a way to force ANT to use a specific executable for
>> the <cvs*> tasks?
> 
> Not via the <cvs*> tasks themselves, but you should be able to modify the
> PATH environment variable within ant before running the <cvs*> tasks.
> Which is (a) not Cygwin-specific in any way, and (b) unnecessary, given
> the above explanation.
> 
>> FWIW, I get similar results using "cvs status" from the command prompt
>> (taking ANT out of the picture).  When using c:\bin\cvs\cvs.exe version
>> the status is returned successfully.  When using c:\cygwin\bin\cvs.exe I
>> get an error.  The error occurs whether I invoke cvs from a dos shell,
>> or a cygwin shell.
> 
> They are built for *different* platforms (Cygwin and Windows), which treat
> paths differently.  Try the mount command above to fix the Cygwin case.
> 	Igor


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list