# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /export/home/padraigo/netbeansFROMHG/main/mercurial # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: src/org/netbeans/modules/mercurial/MercurialAnnotator.java --- src/org/netbeans/modules/mercurial/MercurialAnnotator.java Base (BASE) +++ src/org/netbeans/modules/mercurial/MercurialAnnotator.java Locally Modified (Based On LOCAL) @@ -362,8 +367,12 @@ actions.add(null); if (root != null) { + String projName = HgProjectUtils.getProjectName(root); + if (projName == null) { + projName = root.getName(); + } actions.add(new CloneAction(NbBundle.getMessage(MercurialAnnotator.class, "CTL_PopupMenuItem_CloneLocal", // NOI18N - root.getName()), ctx)); + projName), ctx)); } actions.add(new CloneExternalAction(loc.getString("CTL_PopupMenuItem_CloneOther"), ctx)); // NOI18N actions.add(new FetchAction(NbBundle.getMessage(MercurialAnnotator.class, "CTL_PopupMenuItem_FetchLocal"), ctx)); // NOI18N Index: src/org/netbeans/modules/mercurial/ui/commit/Bundle.properties --- src/org/netbeans/modules/mercurial/ui/commit/Bundle.properties Base (BASE) +++ src/org/netbeans/modules/mercurial/ui/commit/Bundle.properties Locally Modified (Based On LOCAL) @@ -87,3 +87,5 @@ ACSD_CommitDialog=This dialog lets you review list files to commit, exclude or include individual files and write commit message describing your changes. ACSN_CommitForm_Message=Commit Message ACSD_CommitForm_Message=Message describing your commit + +LBL_Refresh_Progress=Refreshing... Index: src/org/netbeans/modules/mercurial/ui/commit/CommitAction.java --- src/org/netbeans/modules/mercurial/ui/commit/CommitAction.java Base (BASE) +++ src/org/netbeans/modules/mercurial/ui/commit/CommitAction.java Locally Modified (Based On LOCAL) @@ -52,6 +52,7 @@ import org.netbeans.modules.mercurial.HgFileNode; import org.netbeans.modules.mercurial.HgModuleConfig; import org.netbeans.modules.mercurial.ui.actions.ContextAction; +import org.netbeans.modules.mercurial.ui.status.StatusAction; import org.netbeans.modules.mercurial.util.HgUtils; import org.netbeans.modules.mercurial.util.HgRepositoryContextCache; import org.netbeans.modules.mercurial.util.HgProjectUtils; @@ -99,8 +100,11 @@ } public boolean isEnabled () { - FileStatusCache cache = Mercurial.getInstance().getFileStatusCache(); - return cache.containsFileOfStatus(context, FileInformation.STATUS_LOCAL_CHANGE); + Set ctxFiles = context != null? context.getRootFiles(): null; + if(HgUtils.getRootFile(context) == null || ctxFiles == null || ctxFiles. +size() == 0) + return false; + return true; } public void performAction(ActionEvent e) { @@ -119,10 +123,21 @@ JOptionPane.INFORMATION_MESSAGE); return; } + RequestProcessor rp = Mercurial.getInstance().getRequestProcessor(root); + final HgProgressSupport support = new HgProgressSupport() { + Runnable doCommit = new Runnable () { + public void run() { String contentTitle = Utils.getContextDisplayName(context); - commit(contentTitle, context); } + }; + public void perform() { + StatusAction.executeStatus(context, this); + SwingUtilities.invokeLater(doCommit); + } + }; + support.start(rp, root.getAbsolutePath(), org.openide.util.NbBundle.getMessage(CommitPanel.class, "LBL_Refresh_Progress")); // NOI18N; + } public static void commit(String contentTitle, final VCSContext ctx) { FileStatusCache cache = Mercurial.getInstance().getFileStatusCache();