# 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/MercurialAnnotator.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/MercurialAnnotator.java Base (1.20) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/MercurialAnnotator.java Locally Modified (Based On 1.20) @@ -336,7 +336,7 @@ File [] files = ctx.getRootFiles().toArray(new File[ctx.getRootFiles().size()]); File root = HgUtils.getRootFile(ctx); boolean goodVersion = Mercurial.getInstance().isGoodVersion(); - boolean noneVersioned = isNothingVersioned(files); + boolean noneVersioned = root == null; boolean onlyFolders = onlyFolders(files); boolean onlyProjects = onlyProjects(nodes); Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/Bundle.properties --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/Bundle.properties Base (1.15) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/Bundle.properties Locally Modified (Based On 1.15) @@ -45,7 +45,7 @@ MSG_CLONE_DONE = INFO: End of Clone MSG_EXTERNAL_CLONE_FROM = INFO Clone From: {0} MSG_EXTERNAL_CLONE_TO = INFO To: {0} - +MSG_CLONE_NOTHING = Nothing yet comitted, so nothing to Clone. LBL_Clone_Progress=Cloning... ClonePanel.fromLabel.text=Source Repository: ClonePanel.toLabel.text=&Parent Directory: Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java Base (1.17) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java Locally Modified (Based On 1.17) @@ -81,6 +81,20 @@ } public void actionPerformed(ActionEvent ev){ + if(!Mercurial.getInstance().isGoodVersionAndNotify()) return; + if(!HgRepositoryContextCache.hasHistory(context)){ + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(CloneAction.class, + "MSG_CLONE_TITLE")); // NOI18N + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(CloneAction.class, + "MSG_CLONE_TITLE_SEP")); // NOI18N + HgUtils.outputMercurialTab(NbBundle.getMessage(CloneAction.class, "MSG_CLONE_NOTHING")); // NOI18N + HgUtils.outputMercurialTabInRed(NbBundle.getMessage(CloneAction.class, "MSG_CLONE_DONE")); // NOI18N + HgUtils.outputMercurialTab(""); // NOI18N + return; + } + final File root = HgUtils.getRootFile(context); if (root == null) return; @@ -228,9 +242,6 @@ } public boolean isEnabled() { - if(!Mercurial.getInstance().isGoodVersion()) return false; - // If it's a mercurial managed repository with history - // enable clone of this repository - return HgRepositoryContextCache.hasHistory(context); + return HgUtils.getRootFile(context) != null; } } 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.8) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/Bundle.properties Locally Modified (Based On 1.8) @@ -130,10 +130,12 @@ MSG_EXPORT_TITLE = Mercurial Export MSG_EXPORT_TITLE_SEP = ---------------- MSG_EXPORT_DONE = INFO: End of Export +MSG_EXPORT_NOTHING = Nothing yet comitted, so nothing to Export. MSG_IMPORT_TITLE = Mercurial Import MSG_IMPORT_TITLE_SEP = ---------------- MSG_IMPORT_DONE = INFO: End of Import +MSG_IMPORT_NOTHING = Nothing yet comitted, so not yet able to Import. MSG_DIFF_TITLE = Mercurial Diff MSG_DIFF_TITLE_SEP = -------------- 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.9) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ExportDiffAction.java Locally Modified (Based On 1.9) @@ -74,12 +74,24 @@ } public void actionPerformed(ActionEvent e) { + if(!Mercurial.getInstance().isGoodVersionAndNotify()) return; + if(!HgRepositoryContextCache.hasHistory(context)){ + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(ExportDiffAction.class, + "MSG_EXPORT_TITLE")); // NOI18N + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(ExportDiffAction.class, + "MSG_EXPORT_TITLE_SEP")); // NOI18N + HgUtils.outputMercurialTab(NbBundle.getMessage(ExportDiffAction.class, "MSG_EXPORT_NOTHING")); // NOI18N + HgUtils.outputMercurialTabInRed(NbBundle.getMessage(ExportDiffAction.class, "MSG_EXPORT_DONE")); // NOI18N + HgUtils.outputMercurialTab(""); // NOI18N + return; + } exportDiff(context); } public boolean isEnabled() { - if(!Mercurial.getInstance().isGoodVersion()) return false; - return HgRepositoryContextCache.hasHistory(context); + return HgUtils.getRootFile(context) != null; } private static void exportDiff(VCSContext ctx) { Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ImportDiffAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ImportDiffAction.java Base (1.10) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ImportDiffAction.java Locally Modified (Based On 1.10) @@ -77,12 +77,24 @@ } public void actionPerformed(ActionEvent e) { + if(!Mercurial.getInstance().isGoodVersionAndNotify()) return; + if(!HgRepositoryContextCache.hasHistory(context)){ + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(ImportDiffAction.class, + "MSG_IMPORT_TITLE")); // NOI18N + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(ImportDiffAction.class, + "MSG_IMPORT_TITLE_SEP")); // NOI18N + HgUtils.outputMercurialTab(NbBundle.getMessage(ImportDiffAction.class, "MSG_IMPORT_NOTHING")); // NOI18N + HgUtils.outputMercurialTabInRed(NbBundle.getMessage(ImportDiffAction.class, "MSG_IMPORT_DONE")); // NOI18N + HgUtils.outputMercurialTab(""); // NOI18N + return; + } importDiff(context); } public boolean isEnabled() { - if(!Mercurial.getInstance().isGoodVersion()) return false; - return HgRepositoryContextCache.hasHistory(context); + return HgUtils.getRootFile(context) != null; } private static void importDiff(VCSContext ctx) { Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/Bundle.properties --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/Bundle.properties Base (1.5) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/Bundle.properties Locally Modified (Based On 1.5) @@ -43,9 +43,10 @@ MSG_Log_TabTitleNotCommitted = Mercurial History - {0} (not committed) MSG_Log_Title = Mercurial History MSG_Log_Title_Sep = ----------------- -MSG_Log_DONE = INFO: End of Mercurial History +MSG_Log_DONE = INFO: End of Mercurial History MSG_Log_Files = INFO History for file(s): {0} MSG_Log_PrjName = INFO Project Name: {0} MSG_Log_PrjPath = INFO Project Path: {0} MSG_Log_Pull_Path = INFO Pull Path: {0} MSG_Log_Push_Path = INFO Push Path: {0} +MSG_Log_Nothing = Nothing yet comitted, so no History available. Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/LogAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/LogAction.java Base (1.10) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/log/LogAction.java Locally Modified (Based On 1.10) @@ -83,6 +83,19 @@ } public void actionPerformed(ActionEvent e) { + if(!Mercurial.getInstance().isGoodVersionAndNotify()) return; + if(!HgRepositoryContextCache.hasHistory(context)){ + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(LogAction.class, + "MSG_Log_Title")); // NOI18N + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(LogAction.class, + "MSG_Log_Title_Sep")); // NOI18N + HgUtils.outputMercurialTab(NbBundle.getMessage(LogAction.class, "MSG_Log_Nothing")); // NOI18N + HgUtils.outputMercurialTabInRed(NbBundle.getMessage(LogAction.class, "MSG_Log_DONE")); // NOI18N + HgUtils.outputMercurialTab(""); // NOI18N + return; + } log(context); } @@ -185,8 +198,6 @@ } public boolean isEnabled() { - if(!Mercurial.getInstance().isGoodVersion()) return false; - // If it's a mercurial managed repository enable log action - Show History - return HgRepositoryContextCache.hasHistory(context); + return HgUtils.getRootFile(context) != null; } } Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/merge/MergeAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/merge/MergeAction.java Base (1.12) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/merge/MergeAction.java Locally Modified (Based On 1.12) @@ -77,7 +77,7 @@ public boolean isEnabled() { Set ctxFiles = context != null? context.getRootFiles(): null; - if(ctxFiles == null || ctxFiles.size() == 0) + if(HgUtils.getRootFile(context) == null || ctxFiles == null || ctxFiles.size() == 0) return false; return true; // #121293: Speed up menu display, warn user if nothing to merge when Merge selected } @@ -98,6 +98,11 @@ return; } if(root != null && !HgCommand.isMergeRequired(root)){ + HgUtils.outputMercurialTabInRed( NbBundle.getMessage(MergeAction.class,"MSG_MERGE_TITLE")); // NOI18N + HgUtils.outputMercurialTabInRed( NbBundle.getMessage(MergeAction.class,"MSG_MERGE_TITLE_SEP")); // NOI18N + HgUtils.outputMercurialTab( NbBundle.getMessage(MergeAction.class,"MSG_NOTHING_TO_MERGE")); // NOI18N + HgUtils.outputMercurialTabInRed( NbBundle.getMessage(MergeAction.class, "MSG_MERGE_DONE")); // NOI18N + HgUtils.outputMercurialTab(""); // NOI18N JOptionPane.showMessageDialog(null, NbBundle.getMessage(MergeAction.class,"MSG_NOTHING_TO_MERGE"),// NOI18N NbBundle.getMessage(MergeAction.class,"MSG_MERGE_TITLE"),// NOI18N Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/pull/Bundle.properties --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/pull/Bundle.properties Base (1.13) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/pull/Bundle.properties Locally Modified (Based On 1.13) @@ -51,6 +51,7 @@ MSG_PULL_NOT_SUPPORTED_INVIEW = Pull is not supported in this View MSG_NO_DEFAULT_PULL_SET = No default Pull path set for this project.\n\nPlease set a default Pull path using Mercurial > Properties. +MSG_NO_DEFAULT_PULL_SET_MSG = No default Pull path set for this project.\nPlease set a default Pull path using Mercurial > Properties. MSG_PULL_MERGE_CONFIRM_TITLE = Confirm Merge after Pull MSG_PULL_MERGE_CONFIRM_QUERY = Pull has completed and Merge is Required.\nMerge the pulled changes now? MSG_PULL_MERGE_UNCOMMITTED_CONFIRM_QUERY = Pull has completed and there were uncommitted merges.\nMerge is Required.\nMerge the pulled changes now? Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/pull/PullAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/pull/PullAction.java Base (1.20) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/pull/PullAction.java Locally Modified (Based On 1.20) @@ -109,6 +109,11 @@ } // If the repository has no default pull path then inform user if(HgRepositoryContextCache.getPullDefault(context) == null){ + HgUtils.outputMercurialTabInRed( NbBundle.getMessage(PullAction.class,"MSG_PULL_TITLE")); // NOI18N + HgUtils.outputMercurialTabInRed( NbBundle.getMessage(PullAction.class,"MSG_PULL_TITLE_SEP")); // NOI18N + HgUtils.outputMercurialTab(NbBundle.getMessage(PullAction.class, "MSG_NO_DEFAULT_PULL_SET_MSG")); // NOI18N + HgUtils.outputMercurialTabInRed(NbBundle.getMessage(PullAction.class, "MSG_PULL_DONE")); // NOI18N + HgUtils.outputMercurialTab(""); // NOI18N JOptionPane.showMessageDialog(null, NbBundle.getMessage(PullAction.class,"MSG_NO_DEFAULT_PULL_SET"), NbBundle.getMessage(PullAction.class,"MSG_PULL_TITLE"), @@ -205,7 +210,7 @@ public boolean isEnabled() { Set ctxFiles = context != null? context.getRootFiles(): null; - if(ctxFiles == null || ctxFiles.size() == 0) + if(HgUtils.getRootFile(context) == null || ctxFiles == null || ctxFiles.size() == 0) return false; return true; // #121293: Speed up menu display, warn user if not set when Pull selected } Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/push/Bundle.properties --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/push/Bundle.properties Base (1.13) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/push/Bundle.properties Locally Modified (Based On 1.13) @@ -58,6 +58,7 @@ MSG_PUSH_ERROR_CANCELED = INFO: Unable to Push as remote branches would be created MSG_NO_DEFAULT_PUSH_SET = No default Push path set for this project.\n\nPlease set a default Push path using Mercurial > Properties. +MSG_NO_DEFAULT_PUSH_SET_MSG = No default Push path set for this project.\nPlease set a default Push path using Mercurial > Properties. MSG_PUSH_MERGE_CONFIRM_TITLE = Confirm Merge after Push MSG_PUSH_MERGE_CONFIRM_QUERY = Push has completed and Merge is Required.\nMerge the pushed changes now? MSG_PUSH_MERGE_UNCOMMITTED_CONFIRM_QUERY = Push has completed and there were uncommitted merges.\nMerge is Required.\nMerge the pushed changes now? Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/push/PushAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/push/PushAction.java Base (1.21) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/push/PushAction.java Locally Modified (Based On 1.21) @@ -101,6 +101,11 @@ // If the repository has no default pull path then inform user if(HgRepositoryContextCache.getPushDefault(context) == null && HgRepositoryContextCache.getPullDefault(context) == null){ + HgUtils.outputMercurialTabInRed( NbBundle.getMessage(PushAction.class,"MSG_PUSH_TITLE")); // NOI18N + HgUtils.outputMercurialTabInRed( NbBundle.getMessage(PushAction.class,"MSG_PUSH_TITLE_SEP")); // NOI18N + HgUtils.outputMercurialTab(NbBundle.getMessage(PushAction.class, "MSG_NO_DEFAULT_PUSH_SET_MSG")); // NOI18N + HgUtils.outputMercurialTabInRed(NbBundle.getMessage(PushAction.class, "MSG_PUSH_DONE")); // NOI18N + HgUtils.outputMercurialTab(""); // NOI18N JOptionPane.showMessageDialog(null, NbBundle.getMessage(PushAction.class,"MSG_NO_DEFAULT_PUSH_SET"), NbBundle.getMessage(PushAction.class,"MSG_PUSH_TITLE"), @@ -112,7 +117,7 @@ } public boolean isEnabled() { Set ctxFiles = context != null? context.getRootFiles(): null; - if(ctxFiles == null || ctxFiles.size() == 0) + if(HgUtils.getRootFile(context) == null || ctxFiles == null || ctxFiles.size() == 0) return false; return true; // #121293: Speed up menu display, warn user if not set when Push selected } Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/rollback/RollbackAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/rollback/RollbackAction.java Base (1.11) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/rollback/RollbackAction.java Locally Modified (Based On 1.11) @@ -77,6 +77,19 @@ } public void actionPerformed(ActionEvent e) { + if(!Mercurial.getInstance().isGoodVersionAndNotify()) return; + if(!HgRepositoryContextCache.hasHistory(context)){ + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(RollbackAction.class, + "MSG_ROLLBACK_TITLE")); // NOI18N + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(RollbackAction.class, + "MSG_ROLLBACK_TITLE_SEP")); // NOI18N + HgUtils.outputMercurialTab(NbBundle.getMessage(RollbackAction.class, "MSG_NO_ROLLBACK")); // NOI18N + HgUtils.outputMercurialTabInRed(NbBundle.getMessage(RollbackAction.class, "MSG_ROLLBACK_DONE")); // NOI18N + HgUtils.outputMercurialTab(""); // NOI18N + return; + } rollback(context); } @@ -157,7 +170,6 @@ } public boolean isEnabled() { - if(!Mercurial.getInstance().isGoodVersion()) return false; - return HgRepositoryContextCache.hasHistory(context); + return HgUtils.getRootFile(context) != null; } } Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/Bundle.properties --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/Bundle.properties Base (1.5) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/Bundle.properties Locally Modified (Based On 1.5) @@ -124,6 +124,7 @@ MSG_REVERT_TITLE_SEP = ---------------- MSG_REVERT_REVISION_STR = Reverting to revision {0} MSG_REVERT_DONE = INFO: End of Revert +MSG_REVERT_NOTHING = Nothing yet comitted, so no nothing to revert. MSG_Refreshing_Revert_Versions = Refreshing Revert Versions MSG_Revision_Default = Index: versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/RevertModificationsAction.java --- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/RevertModificationsAction.java Base (1.9) +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/RevertModificationsAction.java Locally Modified (Based On 1.9) @@ -77,6 +77,19 @@ } public void actionPerformed(ActionEvent e) { + if(!Mercurial.getInstance().isGoodVersionAndNotify()) return; + if(!HgRepositoryContextCache.hasHistory(context)){ + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(UpdateAction.class, + "MSG_REVERT_TITLE")); // NOI18N + HgUtils.outputMercurialTabInRed( + NbBundle.getMessage(UpdateAction.class, + "MSG_REVERT_TITLE_SEP")); // NOI18N + HgUtils.outputMercurialTab(NbBundle.getMessage(UpdateAction.class, "MSG_REVERT_NOTHING")); // NOI18N + HgUtils.outputMercurialTabInRed(NbBundle.getMessage(UpdateAction.class, "MSG_REVERT_DONE")); // NOI18N + HgUtils.outputMercurialTab(""); // NOI18N + return; + } revert(context); } @@ -155,7 +168,6 @@ } public boolean isEnabled() { - if(!Mercurial.getInstance().isGoodVersion()) return false; - return HgRepositoryContextCache.hasHistory(context); + return HgUtils.getRootFile(context) != null; } }