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.
Summary: | I18N - apply diff patch corrupts multibyte | ||
---|---|---|---|
Product: | utilities | Reporter: | Ken Frank <kfrank> |
Component: | Diff | Assignee: | diff-issues@utilities <diff-issues> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | jf4jbug, mmirilovic |
Priority: | P3 | Keywords: | I18N |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
image
image image image image image file file image |
Description
Ken Frank
2007-06-30 04:19:13 UTC
Created attachment 44590 [details]
image
Created attachment 44591 [details]
image
I removed our own encoding handler and rewritten everything to FileEncodingQuery API. This should resolve diff/patch encoding issues. /shared/data/ccvs/repository/subversion/main/src/org/netbeans/modules/subversion/ui/diff/DiffStreamSource.java,v <-- DiffStreamSource.java new revision: 1.18; previous revision: 1.17 /shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/EncodedReaderFactory.java,v <-- EncodedReaderFactory.java new revision: delete; previous revision: 1.14 /shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/DiffAction.java,v <-- DiffAction.java new revision: 1.36; previous revision: 1.35 /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/Attic/ResolveConflictsExecutor.java,v <-- ResolveConflictsExecutor.java new revision: 1.1.2.3; previous revision: 1.1.2.2 /shared/data/ccvs/repository/versioncontrol/util/src/org/netbeans/modules/versioning/util/Utils.java,v <-- Utils.java new revision: 1.7; previous revision: 1.6 /shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/diff/DiffStreamSource.java,v <-- DiffStreamSource.java new revision: 1.32; previous revision: 1.31 /shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/diff/ResolveConflictsExecutor.java,v <-- ResolveConflictsExecutor.java new revision: 1.9; previous revision: 1.8 /shared/data/ccvs/repository/subversion/main/src/org/netbeans/modules/subversion/ui/update/ResolveConflictsExecutor.java,v <-- ResolveConflictsExecutor.java new revision: 1.13; previous revision: 1.12 /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/Attic/DiffStreamSource.java,v <-- DiffStreamSource.java new revision: 1.1.2.3; previous revision: 1.1.2.2 /shared/data/ccvs/repository/diff/src/org/netbeans/api/diff/StreamSource.java,v <-- StreamSource.java new revision: 1.9; previous revision: 1.8 am reopening; most of the problems are still present; I will be clarifying details and adding new gifs tomorrow but problems are mostly the same as in original description below. ken.frank@sun.com Created attachment 50712 [details]
image
Created attachment 50713 [details]
image
Created attachment 50714 [details]
image
Created attachment 50715 [details]
image
Created attachment 50716 [details]
file
Created attachment 50717 [details]
file
Created attachment 50718 [details]
image
as mentioned before, most problems originally described are still present here is info on each new gif or file: 1. eucmain.gif - the correct view of multibyte in the java file in project 2. eucpatch.gif - incorect multibyte as shown by this module in editor, both as name of variable in class file a and in the path and name of the project. 3. eucpatchdiff.ok.gif - the actual diff, in this view, looks ok - ie built in diff engine and graphical diff viewer and other diff engine/viewer combos ok except the textual - see next gif 4. eucpatchdiff.textual.notok.gif - this shows incorrect multibyte, similar to item 2. above 5. eucpatchfile.notcorrect.gif- this is a view of the patchfile itself from a terminal, taken with a snapshot tool, from when project was with euc encoding prop of project, in case the attached actual patch file cannot be seen ok. the multibyte is not correct. 6. eucpatchfile.patch and utfpatchfile.patch - the actual patch file - generated each when project encoding prop was euc-jp or utf8 ( 2 sepraate projects). User was running in ja solaris locale for each. when viewing the utf-8 one from commandline terminal in ja utf-8 locale, the mbyte looks ok but when viewing the euc one from terminal in ja locale (not same as ja utf8 locale) the mbyte is not correct. ken.frank@sun.com Does the patch apply correctly in NetBeans? please tell me steps on how to see if patch applies ok in netbeans, and perhaps some code to use to see if just having some commented text is not enough (as I have done in this case) ken.frank@sun.com Tools | Apply Diff Patch... Maros, In asking question to see if patch applies ok, I was not asking about how to invoke it; (apply diff patch) but what was the expected results, and if there is some simple sample that can help us understand what is expected ? ken.frank@sun.com Modify a file, Export Diff Patch for it and back up the modified file. Now roll back your local changes (restore original file) and try to apply generated patch to the original file. If the current (patched) and backed up file are equal then the patch applied correctly. The merge problem has been fixed and other described issues do not have direct impact on the diff/patch functionality. I tried the simple scenario - it almost works on NetBeans 6.0 FCS. There is one problem that opening diff file on NetBeans editor becomes garbled when it contains multibytes. http://www.netbeans.org/nonav/issues/showattachment.cgi/50713/eucpatch.gif Project encoding is UTF-8, so the patch is generated in UTF-8. It's correct. But the patch file is existing outside project so it seems that it's opened by using native (EUC) encoding. I think it's better to file new issue. Added FEQ implementation that takes care of diff and patch files generated by the IDE. All such files should now open correctly in the editor. ca94f0cc2cb3 |