# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/Bundle.properties --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/Bundle.properties Base (1.10) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/Bundle.properties Locally Modified (Based On 1.10) @@ -78,6 +78,8 @@ LBL_ImportDiff_Progress=Importing Patches +BK3005=Replace existing {0} file? + ACSD_ImportBrowseFolder = Lets you browse for mercurial import file. ImportBrowse_title=Browse for the Import File #~ Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ExportDiffAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ExportDiffAction.java Base (1.11) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ExportDiffAction.java Locally Modified (Based On 1.11) @@ -103,8 +103,17 @@ } final String revStr = ed.getSelectionRevision(); final String outputFileName = ed.getOutputFileName(); - File outputFile = new File(outputFileName); - HgModuleConfig.getDefault().setExportFolder(outputFile.getParent()); + File destinationFile = new File(outputFileName); + if (destinationFile.exists()) { + NotifyDescriptor nd = new NotifyDescriptor.Confirmation(NbBundle.getMessage(ExportDiffAction.class, "BK3005", destinationFile.getAbsolutePath())); + nd.setOptionType(NotifyDescriptor.YES_NO_OPTION); + DialogDisplayer.getDefault().notify(nd); + if (nd.getValue().equals(NotifyDescriptor.OK_OPTION) == false) { + return; + } + } + + HgModuleConfig.getDefault().setExportFolder(destinationFile.getParent()); RequestProcessor rp = Mercurial.getInstance().getRequestProcessor(root.getAbsolutePath()); HgProgressSupport support = new HgProgressSupport() { public void perform() {