delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/12/18:18:54

X-Spam-Check-By: sourceware.org
Date: Wed, 12 Apr 2006 18:18:42 -0400 (EDT)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Michael Giroux <mlgiroux AT gmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: CVS command returns error
In-Reply-To: <e1jr8d$4tt$2@sea.gmane.org>
Message-ID: <Pine.GSO.4.63.0604121805330.21356@access1.cims.nyu.edu>
References: <e1jr8d$4tt$2 AT sea DOT gmane DOT org>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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).  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).

> 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
-- 
				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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019