This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CVS command returns error


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@cs.nyu.edu | igor@watson.ibm.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]