This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 11547 - file based cvs operations improperly resolve path
Summary: file based cvs operations improperly resolve path
Status: REOPENED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscvs (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P3 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords:
: 11751 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-04-18 23:55 UTC by Andrew Bachmann
Modified: 2006-12-04 22:06 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bachmann 2001-04-18 23:55:08 UTC
I have my cvs directory mounted in a workspace ala:

c:\home\myname\workspace

I am using a mount point of: 

modulename/java/src

When I try to do an operation such as "add", or "update", or "commit" on a single file, it fails with this error:

cvs [server aborted]: no such directory com/mywork/package

However, if I do the operation on the directory containing the file, then it *does* work.

Note: before 3.2 this worked fine.
Other details: this seemed to be broken in RC1 too, but I upgraded to RC2 too see if it was fixed here.

Might this be related to the fact that I have multiple CVS mounts from the same repository?  
Or that some of those mounts are below other mounts in the heirarchy?
Comment 1 Milos Kleint 2001-04-19 08:03:56 UTC
Can you please attach the files Root, Repository and Entries from the CVS admin 
subdirectory where the file that cannot be added/commited/.. resides?

Do you have any spaces on the path? (happens on windows quite often but cvs 
doesn't seem to like it) - however if it works on the directories this is not 
the problem probably.

I don't think it has anything to do with mounts, since this is a server/client 
problem..
Comment 2 Andrew Bachmann 2001-04-25 20:22:22 UTC
I decided to reproduce the problem starting from scratch with build 36 (RC3).  
This time, after choosing the external mode, there was no option to use the 
internal cvs client, so I changed the product on this bug from javacvs to 
vcscvs.  (Sorry for picking the wrong one before, Milos Kleint)

Here's what I did:
1. I started with an empty project.
2. I went to "mount cvs" by right-clicking on filesystems.
3. I selected my working directory. [c:\workspace]
4. I chose external with "ssh" [I am using Cygnus on Windows NT]
5. I set my server name.  (fully qualified DNS name)
6. Set my user name.  (the same on my local machine as the repository)
7. Set the repository, without a final slash.
8. Click cvs command-line client support. ("cvs" as executable)
9. Click finish. (don't check the box the check out everything)
10. Right-click CVS filesystem.  Choose "cvs> check out".
11. For module name put "directory/subdirectory" (it works)
12. Create a new file "directory/subdirectory/Filename.java"
13. Right-click the file, choose "cvs> add", type any message. (looks like it 
works.  it adds it to the Entries file with a dummy timestamp and 0 version)
14. Right-click the file, choose "cvs> commit", type any message.

- breaks here -

Output from Output Window:

Command COMMIT_CMD failed.
Check the full output of the command on the Runtime tab in Explorer. The error 
output follows:
cvs commit: cannot open CVS/Entries for reading: No such file or directory
cvs commit: use `cvs add' to create an entry for 
directory\subdirectory\Filename.java
cvs [commit aborted]: correct above errors first!

It seems like the problem is that there is no CVS subdirectory off of 
c:\workspace.  (because I checked out a directory two levels below the top 
level?)

A possible fix could be to take the path from the front of the file and append 
it to the location to execute cvs from.  That is, instead of the execution 
string being:
cmd /x /c "cd /d c:\workspace\\." 
&& "cvs" .... "directory\subdirectory\Filename.java"

it would work if it were
cmd /x /c "cd /d c:\workspace\\directory\subdirectory\" 
&& "cvs" .... "Filename.java"

The subdirectory does have a working CVS directory, so it should work.

Comment 3 Martin Entlicher 2001-04-26 20:06:24 UTC
Please, can you try to upgrade your cvs.exe command-line client to version 1.11
and test if the problem persists ? You can get it from
ftp://ftp.cvshome.org/pub/cvs-1.11/windows/cvs1-11.zip
It is caused by the bad interpretation of the path by the client. It worked in
3.1, because there was the command always executed from the destination
directory.
I've changed this, because now it is possible to select files from different
folders and execute a single command on them at once. This has a big advantage
on slow client-server connection. Therefore I would like to leave it as it is if
it will work with the new version of cvs.
Thanks.
Comment 4 Andrew Bachmann 2001-04-30 16:36:39 UTC
I am currently using a cvs 1.11 client (cygwin).  As a sidenote, you may want to 
examine if the solution for multi-file select operations handles the case where 
files are on different repositories.
Comment 5 Martin Entlicher 2001-05-02 14:37:33 UTC
Please use Windows executable if you work on Windows. If you use UNIX (Cygwin is
something like Unix on Windows) executable, it will not work with Windows
syntax.
Since Unix use '/' as a path separator, but Windows use '\', Cygwin's cvs
doesn't work right in Windows environment.
I don't see a way how can NetBeans recognize whether the executable is Windows
or Unix, therefore it use the platform default path separator.
The only exception is Windows 95/98/ME, where you need to specify the Unix shell
for command execution and then all commands are executed with Unix syntax.
Comment 6 Andrew Bachmann 2001-05-02 19:23:45 UTC
I just tried the windows cvs client.  It does not cooperate at all with the ssh 
client from cygwin.  I am not interested in going on another hunt for an ssh 
client.

Instead, I clicked on "Enable Win95/98 support" and set my command shell to 
cygwin's "sh.exe".  Now, using the cygwin "cvs.exe" seems to work just fine.  
This solution is fine for my purposes.  

Perhaps there should be a separate checkbox for "use unix style path" and "use 
external shell", since I ought not be required to use the external shell, since 
I am using windows NT.  I suppose this solves the "how does netbeans figure out 
what to use", by putting the onus on the user.

Thanks for your help.
Comment 7 Andrew Bachmann 2001-05-02 19:36:53 UTC
I just tried the windows cvs client.  It does not cooperate at all with the ssh client from cygwin.  I am not interested in going on another hunt for an ssh client.

Instead, I clicked on "Enable Win95/98 support" and set my command shell to cygwin's "sh.exe".  Now, using the cygwin "cvs.exe" seems to work just fine.  This solution is fine for my purposes.  

Perhaps there should be a separate checkbox for "use unix style path" and "use external shell", since I ought not be required to use the external shell, since I am using windows NT.  I suppose this solves the "how does netbeans figure out what to use", by putting the onus on the user.

Thanks for your help.
Comment 8 Martin Entlicher 2001-05-02 21:39:59 UTC
O.K. This seems to be reasonable, since you are not the only one who is trying
to use Cygwin's cvs on Win NT.
Reopening the bug and lowering the priority ...
Comment 9 Martin Entlicher 2001-05-02 21:41:50 UTC
Changing to Enhancement.
Comment 10 Martin Entlicher 2001-05-03 21:51:00 UTC
It seems, that many people use Unix executables (Cygwin) under Windows (an awful
combination to support). Therefore rising priority to P3 and Target Milestone to
3.2, since it should be solved to some update to 3.2 release.
Comment 11 Martin Entlicher 2001-05-18 11:04:51 UTC
*** Issue 11751 has been marked as a duplicate of this issue. ***