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 27102 - CVS: Unable to get commit template for non-root files.
Summary: CVS: Unable to get commit template for non-root files.
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcsgeneric (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-06 14:51 UTC by Jiri Kovalsky
Modified: 2003-06-09 14:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2002-09-06 14:51:55 UTC
Development build #200209060100 of NetBeans 4.0
Windows 2000 with JDK 1.4.1 RC build #20

Description:
============
User will not see any commit template for files
that are placed outside the root of used working
directory. This is because of bug in CVS that
behaves in very suspicious way.

Steps to reproduce:
===================
1. Mount CVS filesystem and modify some non-root file.
2. Invoke "CVS|Commit" on that [Locally Modified]
file.
3. The commit dialog will be empty.
Comment 1 Jiri Kovalsky 2002-09-06 16:09:33 UTC
One more observation that reduces the severity of this bug: it
concerns only :local: connections. :pserver: works quite well.
Comment 2 Martin Entlicher 2002-09-12 13:37:04 UTC
It should be much better now (after fix of issue #26079). However it's
still not fully fixed.

The bug appears ONLY under these conditions:
1) You have spaces in your NetBeans user dir AND
2) You have local connection method AND
3) You select a folder min. 2 levels above the file to be committed.

Thus lowering the priority to P5.
Comment 3 dnoyeB 2003-03-19 18:27:12 UTC
Per our discussion in bug 32027 I have additions.

I get blank commit window on directories.

I have windows 2000 and windows 2000 has by default spaces in all user
paths, raising priority.

C:\Documents and Settings\Administrator\.netbeans

All users come under "Documents and Settings"

I use pserver and ext but not local and have same problem.

I checked and I do have 15000 refresh time.  What should it be? and why?
Comment 4 dnoyeB 2003-03-19 18:28:04 UTC
I should add that if I select the nodes in the directory as opposed to
selecting the directory itself, it works fine.
Comment 5 Martin Entlicher 2003-03-21 13:52:22 UTC
I don't see another solution to this problem than one totally crazy:
Copy wincat.bat to *ALL* subfolders in your working directory!!!

This will be only temporary however, as soon as the commit finish, the
files will be deleted.

The problem is, that Windows invented spaces in folders & files, but
Windows applications (cvs.exe) can not handle them!
I need to pass wincat.bat file to cvs.exe as the editor so that I can
get the template from the standard output then. But I need to put the
wincat.bat file somewhere. If the folder contains spaces cvs.exe does
not find it! I didn't find a way how to workaround this problem.

So until someone suggests a better solution, be prepared for the mad
fix.
Comment 6 dnoyeB 2003-03-21 14:00:55 UTC
Why does this work on files, even if group selected, but not
directories.  I don't understand how it can be a problem with spaces
if it works file with files which also have spaces in their paths.

Netbeans also has spaces in its install path.
cvs.exe also has spaces in its install path.

If you can't reproduce, maybe its because of one of those other two items.

What is meant by non-root files?
Comment 7 Martin Entlicher 2003-03-21 14:21:23 UTC
> Why does this work on files, even if group selected, but not
> directories.

Because I execute just cvs.exe -e wincat.bat commit
If wincat.bat does not exist in current directory it does not work.
For files it works, because cvs.exe is executed in the directory where
the modified files are. For folders it does not work when the modified
files are deep in the directory structure.

e.g.:
c:\work\wincat.bat
c:\work\Test.java
c:\work>cvs -e wincat.bat commit Test.java
^^^ this works O.K. ^^^
But:
c:\work\org\netbeans\modules\test\Test.java
c:\work>cvs -e wincat.bat commit org
^^^ this does NOT work (cvs does not find wincat.bat) ^^^
Probably cvs.exe cd itself to subdirectories, which do not contain
wincat.bat file. If I copy the file there it works!


> Netbeans also has spaces in its install path.
> cvs.exe also has spaces in its install path.

Yes. But try cvs.exe -e "C:\Folder With Spaces\wincat.bat" commit
This does not work and I didn't find a way how to make it work.
So the problem is to find a folder which does not find spaces and
where can I put wincat.bat.

Perhaps if I can get the system drive I will hopefully have write
permission to the root of that drive. Windows gurus, what do you
think?
I can get the userdir drive more easily. A chance to be able to write
there can be also high. But can I be sure?
Comment 8 Martin Entlicher 2003-03-21 14:39:16 UTC
Ha, there's SYSTEMDRIVE environment variable on Windows. I hope it's
defined on all Windows. It the write permissions are guaranteed into
that folder for users, I can use this...
Comment 9 Martin Entlicher 2003-03-21 15:05:14 UTC
SYSTEMDRIVE is unusable. On Windows XP I may not have write access
rights to SYSTEMDRIVE.

So, I'm starting to work on the crazy fix.
I'll create temporarily wincat.bat in all subdirectories of the
committed directory. This is the only way how I'm able to fix the
problem.
Comment 10 Martin Entlicher 2003-03-21 15:50:58 UTC
Hopefully fixed correctly (although it's crazy) in the main trunk:

/cvs/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsCommit.java,v 
<--  CvsCommit.java
new revision: 1.10; previous revision: 1.9

After verification I'll merge the fix into the release35 branch.
Comment 11 Jiri Kovalsky 2003-03-21 16:39:37 UTC
Well, the first testing looks good. I propose to integrate the fix
into release35 branch. Can you check it too dnoyeB ? Thanks.
Comment 12 Martin Entlicher 2003-03-21 17:18:42 UTC
The fix is merged into release35 branch:

/cvs/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsCommit.java,v 
<--  CvsCommit.java
new revision: 1.9.2.1; previous revision: 1.9
Comment 13 dnoyeB 2003-03-21 18:55:55 UTC
I wonder how eclipse does it, or do they?
Comment 14 Martin Entlicher 2003-03-21 19:59:54 UTC
I suppose, that they have Java implementation of cvs client, like
JavaCVS. But JavaCVS currently does not handle the commit templates at
all :((

Comment 15 dmladek 2003-06-09 14:36:59 UTC
I tested on NB35 #03-0602-2350 and seems working fine. But I haven't
my user_dir in path with spaces....