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 12819 - VCS systems need a protocol to know which FileObjects are binary files
Summary: VCS systems need a protocol to know which FileObjects are binary files
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords:
: 11807 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-06-13 16:18 UTC by Andrew Sherman
Modified: 2001-07-20 20:10 UTC (History)
0 users

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 Andrew Sherman 2001-06-13 16:18:53 UTC
I have a MultiDataObject which has several secondary files.  One of these
files is a binary object, in fact it is a serialized JarContents file,
it is identical to a .jarContents file.  Using CVS support I can add
my MultiDataObject to CVS; each of the secondary files (and the primary file)
is then added to CVS.

When my MultiDataObject is retrieved from CVS there is some
adjustment made (for newlines) to the file because it has not been tagged as
a binary file. This means that the file is corrupted.

There needs to be a programmatic protocol to tag a secondary file as binary.

It seems to me that the right solution is something along the lines of
this. When I create a binary file I add a FileSystem attribute for it
like "isBinary". Then when CVS is adding FileObjects it checks if
this attribute is present. If it is then the file is added as binary.
This should avoid the data corruption.
Comment 1 Milos Kleint 2001-06-13 16:27:50 UTC
moving to vcscore..
Comment 2 Jiri Kovalsky 2001-06-14 09:38:12 UTC
You are right that it would be nice to have such a feature. Unfortunately we 
have already one issue filed on this so I mark this one as its duplicate.
However there are currently two workarounds:
1. First is to set it up on CVS server that all *.jarContents files are binary.
2. Second is to turn on "Advanced Option" property of CVS filesystem. If you wa-
   nt then to "CVS|Add" such a MultiDataObject you will get adding dialog with
   more options and one of them is "Keyword Substitution" where you can specify
   that some file is binary. Use "Prompt for Input on Each Successive File" to
   go through all files individually so that you can tag them all properly.

*** This issue has been marked as a duplicate of 11807 ***
Comment 3 Milos Kleint 2001-06-14 09:58:29 UTC
well, this bug is not duplicate. it deals with adding the binaries in other
modules, not the User interface...

thus I'm reopening the issue..
Comment 4 Andrew Sherman 2001-06-14 18:01:07 UTC
As there seems to be some confusion about this bug I will add my expectations, 
based on email from milos.kleint@czech.sun.com and Martin.Entlicher@Sun.COM.

1) All CVS clients (forgive me if wrong terminology) will need to respect 
   this protocol. This means vcscvs (command-line cvs support) 
   vcsgeneric (VSS and PVCS support) and possible javacvs.
2) Milos will implement a prototype fix and send to Andrew sometime 
   in the beginning of the week of 18-jun-2001. [BTW I am on vacation 
   on the 18th]
3) These fixes will be included in the pilsen_fcs branch in time for 
   Pilsen FCS.
Comment 7 Milos Kleint 2001-06-19 07:40:26 UTC
i've commited the fix for javacvs in the main trunk.
see diff:
http://www.netbeans.org/unbranded-source/browse/javacvs/src/org/netbeans/modules/javacvs/commands/CvsAdd.java.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&f=h

However for pilsen the fix will differ (due to a refactoring made post-3.2)
Comment 8 Martin Entlicher 2001-06-19 17:19:42 UTC
*** Issue 11807 has been marked as a duplicate of this issue. ***
Comment 9 Martin Entlicher 2001-06-19 17:32:05 UTC
I'm reopening the issue. Due to the discussion on nbdev it seems, that we have
to use a different approach to fix this.
Instead of FileObject attributes we'll get the information from the MIME type.
See http://www.netbeans.org/www-nbdev/msg07927.html and the associated thread
for details.
Comment 10 Milos Kleint 2001-06-20 10:24:44 UTC
i've fixed that in javacvs.. now using the mimetype to resolve binariness..:)
(now works also for recursive add option)

diff (against a revision BEFORE the previous change based on fileobject attributes.
http://www.netbeans.org/unbranded-source/browse/javacvs/src/org/netbeans/modules/javacvs/commands/CvsAdd.java.diff?r1=text&tr1=1.5&r2=text&tr2=1.7&f=h

http://www.netbeans.org/unbranded-source/browse/javacvs/src/org/netbeans/modules/javacvs/commands/FileSystemCommand.java.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&f=h
Comment 11 Martin Entlicher 2001-06-20 17:32:46 UTC
Fixed to use MIME types in the main trunk in vcscore, vcscvs and vcsgeneric
modules. The fix will appear in tomorrow's build.
Here are the new diffs for Pilsen integration:

vcscore:
http://www.netbeans.org/unbranded-source/browse/vcscore/src/org/netbeans/modules/vcscore/commands/VcsCommand.java.diff?r1=1.18&r2=1.19
http://www.netbeans.org/unbranded-source/browse/vcscore/src/org/netbeans/modules/vcscore/VcsAction.java.diff?r1=1.43&r2=1.45
http://www.netbeans.org/unbranded-source/browse/vcscore/src/org/netbeans/modules/vcscore/VcsAction.java.diff?r1=1.46&r2=1.47
methods and constants associated with file object attributes will not be
incorporated into Pilsen branch.

vcscvs:
http://www.netbeans.org/unbranded-source/browse/vcscvs/src/org/netbeans/modules/vcs/cmdline/CommandLines.properties.diff?r1=1.109&r2=1.111
http://www.netbeans.org/unbranded-source/browse/vcscvs/src/org/netbeans/modules/vcs/cmdline/CvsFileSystem.java.diff?r1=1.135&r2=1.137

vcsgeneric:
http://www.netbeans.org/unbranded-source/browse/vcsgeneric/src/org/netbeans/modules/vcs/advanced/commands/CommandNode.java.diff?r1=1.12&r2=1.13
http://www.netbeans.org/unbranded-source/browse/vcsgeneric/src/org/netbeans/modules/vcs/advanced/commands/Bundle.properties.diff?r1=1.13&r2=1.14
http://www.netbeans.org/unbranded-source/browse/vcsgeneric/src/org/netbeans/modules/vcs/advanced/config/vcs/config/vssWin.xml.diff?r1=1.13&r2=1.15
http://www.netbeans.org/unbranded-source/browse/vcsgeneric/src/org/netbeans/modules/vcs/advanced/config/vcs/config/vssWin98.xml.diff?r1=1.15&r2=1.17
http://www.netbeans.org/unbranded-source/browse/vcsgeneric/src/org/netbeans/modules/vcs/advanced/config/vcs/config/vssWin98Loc_XX.xml.diff?r1=1.1&r2=1.3
http://www.netbeans.org/unbranded-source/browse/vcsgeneric/src/org/netbeans/modules/vcs/advanced/config/vcs/config/vssWin98Loc_ja.xml.diff?r1=1.3&r2=1.5
http://www.netbeans.org/unbranded-source/browse/vcsgeneric/src/org/netbeans/modules/vcs/advanced/config/vcs/config/vssWinLoc_XX.xml.diff?r1=1.1&r2=1.3
http://www.netbeans.org/unbranded-source/browse/vcsgeneric/src/org/netbeans/modules/vcs/advanced/config/vcs/config/vssWinLoc_ja.xml.diff?r1=1.2&r2=1.4
Comment 12 dmladek 2001-06-22 17:02:06 UTC
works ok on [NBdev-200106220100] on my linux

but I'm not able to create jar in ide:-( 
Selected fiels don't have an action "created a jar" as it was possible in NB-30
so I'm tested only with single DO (binary of'course)

Comment 13 Martin Entlicher 2001-06-26 17:37:40 UTC
Fixed in pilsen_fcs branch.
Comment 14 Milos Kleint 2001-06-26 17:58:57 UTC
fixed in pilsen_fcs for javacvs as well..