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 32186 - wincat.bat stays in the explorer after commit command
Summary: wincat.bat stays in the explorer after commit command
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcsgeneric (show other bugs)
Version: -S1S-
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: SPACE_IN_PATH
: 32834 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-21 12:42 UTC by Sergey Soldatov
Modified: 2004-03-03 23:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (1.30 KB, text/plain)
2003-04-11 16:57 UTC, dmladek
Details
The contextual diff of the fix. (4.77 KB, patch)
2003-04-18 14:26 UTC, Martin Entlicher
Details | Diff
The binary patch. To apply, put into <NB-install>/modules/patches/org-netbeans-modules-vcs-profiles-cvsprofiles/ folder. (9.65 KB, application/octet-stream)
2003-04-18 14:32 UTC, Martin Entlicher
Details
The updated cvs profiles. Unpack in <NB-user-dir>/system/vcs folder and remount the FS OR ajdust LOCAL_FILES_FILTERED_OUT variable as described above. (29.75 KB, application/octet-stream)
2003-04-18 14:35 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Soldatov 2003-03-21 12:42:50 UTC
Reproducible with S1S build 030319 on Win2K platform. 
Mount generic CVS repository. Create a folder, add it to 
CVS. Now create a file in this folder. Add this file to 
CVS and call commit command. 'Wincat.bat' node will appear 
in the explorer view. But there is no such file on the 
host. It doesn't happen if we create a file in the root 
node.
Comment 1 Martin Entlicher 2003-03-21 13:09:46 UTC
I was able to reproduce it. It gets into Explorer due to the refresh
called after commit, the physical file is deleted right after commit
finish, but the file can not disappear from Explorer due to the
default refresh time == 0.

The fact, that Windows do not have a command like UNIX cat brings a
lot of problems (associated issue #27102).
Comment 2 Martin Entlicher 2003-03-21 17:58:45 UTC
After the fix of issue #27102 the problem might be more important, so
increasing the priority.
It's almost impossible to do filtering in VcsFileSystem.children(),
but maybe the refresh of the folder after commit is not necessary. If
the refresh is not performed the wincat.bat should not appear in the
Explorer at all.
Comment 3 dnoyeB 2003-03-21 21:19:28 UTC
isint windows 'type' command like UNIX 'cat' command?  after commit
the status must be changed, can this be done without refresh?  I dont
think CVS refresh is necessary but the nodes need updating.
Comment 4 Jiri Kovalsky 2003-03-22 08:28:27 UTC
'type' is not an editor which is required by cvs.exe binary. It's only
command of cmd.exe. As for not calling refresh, I also proposed this
to Martin in person but must investigate it first.
Comment 5 dnoyeB 2003-03-22 14:21:45 UTC
Why is cat needed and what is it doing anyway?  I do not 
understand this because I have other cvs applications like 
wincvs that done seem to have issues.
Comment 6 Martin Entlicher 2003-03-22 15:52:42 UTC
> Why is cat needed and what is it doing anyway?

It's a way how can I obtain the commit template and the list of
committed files from CVS. I need to present the same information that
you have when you do cvs ci on the command line. cvs.exe opens an
editor (e.g. notepad.exe) and gives it some temporary file with some
text. And I need to get that text and present it in NetBeans, not in
Notepad.
The simple solution in UNIX world is to supply 'cat' as the editor and
then simply read the commit template from the standard output. This
work reliably and it's easy.
But what is easy on UNIX is a terrible overkill on Windows. Since
'type' on Windows is not an executable, cvs -e type does not work. So
I've created an "executable" wincat.bat which is nothing more than
'type' wrapped in a batch file so that it gets interpretted by the
shell. It works O.K., but there is one "small" problem: where to put
that file???
The conclusion is, that it must be in all directories, that cvs
inspects so that it will always find it. Because I can not pass the
absolute path to that file because of the problem with space in path.

I've no idea how wincvs solves this problem, but my impression is,
that wincvs has some special access to cvs.exe. IMHO they're able to
get the commit template directly, I doubt thay do some quirks with the
template editor.

Comment 7 dnoyeB 2003-03-22 18:34:36 UTC
I think its worth investigation.  I know wincvs does not 
have _any_ special access to cvs.exe.  its a totally 
seperate program.
Comment 8 dmladek 2003-04-11 16:53:51 UTC
oups:/ I didn't find this issue so I anter a duplicat issue #32834
I'm gonna attach the Exception stack trace....
Comment 9 dmladek 2003-04-11 16:57:23 UTC
Created attachment 9891 [details]
stacktrace
Comment 10 Martin Entlicher 2003-04-11 17:40:41 UTC
The IOException must occur, because the wincat.bat file is deleted as
soon as the commit command finish. The exception can not be "fixed".
Comment 11 Martin Entlicher 2003-04-17 18:42:05 UTC
dnoeB: I've just played a while with wincvs 1.3.12.1. It does not seem
to handle the templates like we do in NetBeans. Commit presents you an
empty text area and in :local: connection method you will not get the
template even if it's in rcsinfo. Perhaps it's reads just CVS/Template
file if exists (in local mode CVS/Template file is not created on
checkout).

So, if we like to have the nice template in the commit dialog, we can
not live without wincat.bat :-(((

The problem that it stays in the explorer can be simply solved by
renaming the file to some name that will not likely exist in the user
directory and filter it by default.
If we use a name like .nbcicat.bat it's a very low probability that
the user will have a file of that name so we can filter it by default
like we filter .nbattrs.

Since I don't have a better solution and this is a quite nasty bug I'm
going to solve it this way.
Comment 12 Jiri Kovalsky 2003-04-18 08:53:01 UTC
I am definetely for this. Even if there is a guy who has .nbcicat.bat
file in his working directory and he won't see it in the IDE, he
deserves it ! :-) In the worst case we will get another P1 issue ...
Comment 13 Martin Entlicher 2003-04-18 14:25:18 UTC
Fixed in the main trunk as proposed. The fix is trivial and seems to
work O.K. However it's necessary to remount the CVS filesystem for the
filtering to take effect, or you can add ".nbcicat.bat" to the value
of LOCAL_FILES_FILTERED_OUT variable manually as it is in the
contextual diff.

Jiri or others, please adjust the priority accordingly if you want
this to be fixed in NB 3.5.

Checking in commands/CvsCommit.java;
/cvs/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsCommit.java,v 
<--  CvsCommit.java
new revision: 1.11; previous revision: 1.10
done
Processing log script arguments...
More commits to come...
Checking in config/cvsWin.xml;
/cvs/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/config/cvsWin.xml,v 
<--  cvsWin.xml
new revision: 1.36; previous revision: 1.35
done
Checking in config/cvsWin98.xml;
/cvs/vcsgeneric/profiles/cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/config/cvsWin98.xml,v 
<--  cvsWin98.xml
new revision: 1.35; previous revision: 1.34
done
Comment 14 Martin Entlicher 2003-04-18 14:26:29 UTC
Created attachment 10022 [details]
The contextual diff of the fix.
Comment 15 Martin Entlicher 2003-04-18 14:32:58 UTC
Created attachment 10023 [details]
The binary patch. To apply, put into <NB-install>/modules/patches/org-netbeans-modules-vcs-profiles-cvsprofiles/ folder.
Comment 16 Martin Entlicher 2003-04-18 14:35:13 UTC
Created attachment 10024 [details]
The updated cvs profiles. Unpack in <NB-user-dir>/system/vcs folder and remount the FS OR ajdust LOCAL_FILES_FILTERED_OUT variable as described above.
Comment 17 Jiri Kovalsky 2003-04-25 09:39:15 UTC
This is regression in functionality, annoying and visible enough to
document it. Adding appropriate keyword. I honestly regret we didn't
make it for FCS of Sun ONE Studio 5.0.
Comment 18 Patrick Keegan 2003-04-25 13:34:07 UTC
proposed relnote:

A  Wincat.bat node appears in the Explorer after you run the Commit
command on a generic VCS filesystem. The node is harmless, so you can
ignore it.

Comment 19 Jiri Kovalsky 2003-04-25 14:12:38 UTC
I think it's clear. However, it occurs only sometimes i.e. not all
users will experience it. Can you Martin shed some light on this ? I
know it happens on Windows only and with user dir containing space. Is
it right ?
Comment 20 Martin Entlicher 2003-04-25 14:43:33 UTC
Yes, Jiri is right. It happens only under these two conditions. The
wincat.bat nodes can be dismissed by Refresh.
Comment 21 Patrick Keegan 2003-04-25 15:32:54 UTC
Thanks for the info. Second attempt:

"When running on Microsoft Windows systems and there is a space in the
name of your user directory, a Wincat.bat node appears in the Explorer
after you run the Commit
command on a generic VCS filesystem. 

Workaround: The node is harmless, so you can ignore it. Or you can
remove it by running the Refresh command on the filesystem."


I think it's clear. However, it occurs only sometimes i.e. not all
users will experience it. Can you Martin shed some light on this ? I
know it happens on Windows only and with user dir containing space. Is
it right ?



------- Additional Comments From Martin Entlicher 2003-04-25 06:43 PDT
-------

Yes, Jiri is right. It happens only under these two conditions. The
wincat.bat nodes can be dismissed by Refresh.
Comment 22 Jiri Kovalsky 2003-04-25 15:49:48 UTC
Excellent. I am ignoring the comments from Martin and me ... ;-)
Comment 23 Jiri Kovalsky 2003-08-11 08:13:47 UTC
Perfect, it works as intended. No .nbcicat.bat nodes appear in the
explorer now. Verified in development build #200308060100 of NetBeans 4.0.
Comment 24 Jiri Kovalsky 2003-11-04 14:43:24 UTC
Confirmed as fixed in Sun ONE Studio 5.0 patched with Update 1.
Comment 25 Antonin Nebuzelsky 2003-11-04 15:11:47 UTC
Fixed also in Nevada Patch 1 and in Arrow. (and confirmed verfied by
Jirka above...)
Comment 26 Patrick Keegan 2004-03-03 23:09:22 UTC
removing RELNOTE keyword