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.
I did some refactorings on a project and then took a look at diffs in cvslite. It showed a number of changes of the form Base: // Variables declaration - do not modify//GEN-BEGIN:variables Locally Modified: // Variables declaration - do not modify or // </editor-fold>//GEN-END:initComponents vs. // </editor-fold> But command-line CVS reported no such differences.
I believe this is a problem in diff.
I guess it's unix only. On Unixes diff takes locally modified version from Document/editor. The document does not contain guarded block delimiters. On Windows diff takes disk file ignoring all unsaved changes. Till now, I have been aware only about LF (Document) vs CRLF (File) problems on Windows. There is yet another inconsitency - guarded block delimiters. Possible workaround is to call saveAll() before invoking diff and drop direct reading from editor Document. Any objections?
The direct reading from editor Document is not there because of save. The old VCS did save files in interest before diff was called, therefore this did not cause any problems. The reading from document is there because of encoding. We can not read the file from java.io.File, because we do not know the encoding.
Recent implementation always reads from file. It works for guarded blocks. BTW encoding is not taken into account. All files are expected to use platform default encoding. Unfortunatelly it's impossible to rewrite to Documents because there is no Document access for secondary files (such as .form). Encoding detection API is also missing. I could backport workarounds from tasklist module - explicit support for java, xml, properties file formats.