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.
Created attachment 152829 [details] Patch to apply * Clone the NB sources from main * Checkout the following commit changeset: 286455:3030ab28d2a4 tag: tip parent: 286454:2d4d89ed11f3 parent: 286436:59b25963a8db user: ffjre@netbeans.org date: Mon Mar 23 17:08:43 2015 +0000 summary: Automated merge with main-silver * Apply given patch via Mercurial/Patches/Apply Diff Patch... ACTUAL: not all files get patched (f.e. in the patch file there are changes of files in "refactoring.api", but they weren't patched EXPECTED: patch can be applied, all files referenced in the patch file get patched
Created attachment 152830 [details] Shows content of patch file and the patch report Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 1 Java: 1.8.0_40; Java HotSpot(TM) 64-Bit Server VM 25.40-b25 Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b25 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
FYI: Applying the patch at cmdline works without any hassle D:\ws\main>hg import FindUsages.diff applying FindUsages.diff
Is it the CodeGeneratorTest.java that is not patched? > D:\ws\main>hg import FindUsages.diff > applying FindUsages.diff Well, hg import is different than Patches/Apply Diff Patch...
if i understand correctly, the apply patch action fails at this point: diff --git a/java.source.base/test/unit/src/org/netbeans/modules/java/classfile/CodeGeneratorTest.java b/java.source/test/unit/src/org/netbeans/modules/java/classfile/CodeGeneratorTest.java rename from java.source.base/test/unit/src/org/netbeans/modules/java/classfile/CodeGeneratorTest.java rename to java.source/test/unit/src/org/netbeans/modules/java/classfile/CodeGeneratorTest.java and does not continue further. Probably it does not understand "rename" pattern. Not sure however why it does not at least continue and leave just CodeGeneratorTest.java unpatched.
the patch file contains several directives not supported by NetBeans internal patch action. - rename + diff - copy - binary patch Unfortunately your patch contains pretty much everything NetBeans does not know. BTW, the correct way to apply a patch exported with Mercurial is Merc -> Patches -> Import Changesets.
Created attachment 152892 [details] shorten version of the patch containing just problematic parts
Sadly the only way to import git patches is using our internal apply. So i guess at least binary and renamed files should be supported.
filed this for binary patches: bug 253546 filed this for mercurial import in the first place: 253547
#253547 fixed -> the original problem with applying hg patch file should be gone. But still, copied and renamed files should be properly handled by the patch action because it blocks git-exported patches completely.
Fix: http://hg.netbeans.org/core-main/rev/5d1b4a2b2f38
Integrated into 'main-silver', will be available in build *201509100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/5d1b4a2b2f38 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #251409 - Apply patch leaves out some files Properly handle copy/renames in textual patches