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.
If I am working on files in a dir /space/src/nb_all which corresponds to a netbeans.org CVS checkout, and I use Export Diff Patch..., I expect the filenames in the patch to be relative to /space/src/nb_all. E.g. I want ant/manifest.mf which can be used as is by anyone with a CVS checkout of netbeans.org; but instead I get /space/src/nb_all/ant/manifest.mf This makes the patch harder to apply e.g. from the command line: you need to use some positive value for -p.
NetBeans generates absolute paths but relative "Index:". My understatning was that patch prefers Index: entries.
It is true that the Index paths are relative. The problem is that they are relative to an apparently arbitrary root. For example: Index: src/org/netbeans/modules/ant/freeform/jdkselection/Util.java *** /space/src/nb_all/ant/freeform/samples/src/org/netbeans/modules/ant/freeform/jdkselection/Util.java No Base Revision --- /space/src/nb_all/ant/freeform/samples/src/org/netbeans/modules/ant/freeform/jdkselection/Util.java Locally New should read Index: ant/freeform/samples/src/org/netbeans/modules/ant/freeform/jdkselection/Util.java *** /space/src/nb_all/ant/freeform/samples/src/org/netbeans/modules/ant/freeform/jdkselection/Util.java No Base Revision --- /space/src/nb_all/ant/freeform/samples/src/org/netbeans/modules/ant/freeform/jdkselection/Util.java Locally New Otherwise someone applying the patch needs to be told which dir to cd into in order to apply it. It seems that the basedir is chosen as whatever dir you happened to select when doing Show Changes. (Not sure what it does if you select two dirs!) But that dir is not significant except for limiting the scope of the files I want to scan. The real root is the CVS root, i.e. the dir where CVS/Repository (if it exists) would read ".".
Sounds reasonable. Currently cvs generates patches relative to the closest common parent directory of patched files.
Index paths are now relative to CVS root. The patch can then be applied anywhere below or at CVS root. /shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/diff/ExportDiffAction.java,v <-- ExportDiffAction.java new revision: 1.42; previous revision: 1.41 /shared/data/ccvs/repository/javacvs/cvsmodule/src/org/netbeans/modules/versioning/system/cvss/ui/actions/diff/Bundle.properties,v <-- Bundle.properties new revision: 1.27; previous revision: 1.26 /shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/builtin/ContextualPatch.java,v <-- ContextualPatch.java new revision: 1.6; previous revision: 1.5