X-Spam-Check-By: sourceware.org Date: Wed, 12 Apr 2006 18:56:23 -0400 (EDT) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Michael Giroux cc: cygwin AT cygwin DOT com Subject: Re: CVS command returns error In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Ugh, top-posting... Reformatted. On Wed, 12 Apr 2006, Michael Giroux wrote: > 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 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 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 > > > commands. Is there a way to force ANT to use a specific executable > > > for the tasks? > > > > Not via the tasks themselves, but you should be able to modify > > the PATH environment variable within ant before running the > > 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 > > 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 Yes, that's one way of addressing this. > 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 AT cvs DOT forge DOT objectweb DOT org:/cvsroot/howl login Ah, that explains it. In your previous message you neglected to mention that this was a remote path, so I assumed the path was local. > 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 Well, since we're talking about the remote server, never mind this mount. > 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. Exactly. I would guess the reason is pretty simple -- the Windows version of CVS produces CRLF line endings, whereas Cygwin's cvs expects LF line endings, so it sends the CR as part of the remote path (which the server, of course, cannot open). To confirm this, could you please post the output of "/usr/bin/cvs status | od -c"? I would also try mount -st 'e:\workspace\logger' /cygdrive/e/workspace/logger to force text mode on that directory, and see if that fixes the issue. > 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. The reason Cygwin's cvs doesn't work for you is likely a line endings issue. Just to rule out some other common problems, why not follow the Cygwin problem reporting guidelines at and attach the output of "cygcheck -svr"? HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac" -- 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/