Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 135672 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/netbeans/modules/mercurial/MercurialAnnotator.java (-1 / +5 lines)
 Lines 362-369    Link Here 
362
367
363
            actions.add(null);
368
            actions.add(null);
364
            if (root != null) {
369
            if (root != null) {
370
                String projName = HgProjectUtils.getProjectName(root);
371
                if (projName == null) {
372
                    projName = root.getName();
373
                }
365
                actions.add(new CloneAction(NbBundle.getMessage(MercurialAnnotator.class, "CTL_PopupMenuItem_CloneLocal",  // NOI18N
374
                actions.add(new CloneAction(NbBundle.getMessage(MercurialAnnotator.class, "CTL_PopupMenuItem_CloneLocal",  // NOI18N
366
                        root.getName()), ctx));
375
                        projName), ctx));
367
            }
376
            }
368
            actions.add(new CloneExternalAction(loc.getString("CTL_PopupMenuItem_CloneOther"), ctx));     // NOI18N        
377
            actions.add(new CloneExternalAction(loc.getString("CTL_PopupMenuItem_CloneOther"), ctx));     // NOI18N        
369
            actions.add(new FetchAction(NbBundle.getMessage(MercurialAnnotator.class, "CTL_PopupMenuItem_FetchLocal"), ctx)); // NOI18N
378
            actions.add(new FetchAction(NbBundle.getMessage(MercurialAnnotator.class, "CTL_PopupMenuItem_FetchLocal"), ctx)); // NOI18N
(-)src/org/netbeans/modules/mercurial/ui/commit/Bundle.properties (+2 lines)
 Lines 87-89    Link Here 
87
ACSD_CommitDialog=This dialog lets you review list files to commit, exclude or include individual files and write commit message describing your changes.
87
ACSD_CommitDialog=This dialog lets you review list files to commit, exclude or include individual files and write commit message describing your changes.
88
ACSN_CommitForm_Message=Commit Message
88
ACSN_CommitForm_Message=Commit Message
89
ACSD_CommitForm_Message=Message describing your commit
89
ACSD_CommitForm_Message=Message describing your commit
90
91
LBL_Refresh_Progress=Refreshing...
(-)src/org/netbeans/modules/mercurial/ui/commit/CommitAction.java (-3 / +18 lines)
 Lines 52-57    Link Here 
52
import org.netbeans.modules.mercurial.HgFileNode;
52
import org.netbeans.modules.mercurial.HgFileNode;
53
import org.netbeans.modules.mercurial.HgModuleConfig;
53
import org.netbeans.modules.mercurial.HgModuleConfig;
54
import org.netbeans.modules.mercurial.ui.actions.ContextAction;
54
import org.netbeans.modules.mercurial.ui.actions.ContextAction;
55
import org.netbeans.modules.mercurial.ui.status.StatusAction;
55
import org.netbeans.modules.mercurial.util.HgUtils;
56
import org.netbeans.modules.mercurial.util.HgUtils;
56
import org.netbeans.modules.mercurial.util.HgRepositoryContextCache;
57
import org.netbeans.modules.mercurial.util.HgRepositoryContextCache;
57
import org.netbeans.modules.mercurial.util.HgProjectUtils;
58
import org.netbeans.modules.mercurial.util.HgProjectUtils;
 Lines 99-106    Link Here 
99
    }
100
    }
100
101
101
    public boolean isEnabled () {
102
    public boolean isEnabled () {
102
        FileStatusCache cache = Mercurial.getInstance().getFileStatusCache();
103
        Set<File> ctxFiles = context != null? context.getRootFiles(): null;
103
        return cache.containsFileOfStatus(context, FileInformation.STATUS_LOCAL_CHANGE);
104
        if(HgUtils.getRootFile(context) == null || ctxFiles == null || ctxFiles.
105
size() == 0)
106
            return false;
107
        return true;
104
    }
108
    }
105
109
106
    public void performAction(ActionEvent e) {
110
    public void performAction(ActionEvent e) {
 Lines 119-128    Link Here 
119
                    JOptionPane.INFORMATION_MESSAGE);
123
                    JOptionPane.INFORMATION_MESSAGE);
120
            return;
124
            return;
121
        }
125
        }
126
        RequestProcessor rp = Mercurial.getInstance().getRequestProcessor(root);
127
        final HgProgressSupport support = new HgProgressSupport() {
128
            Runnable doCommit = new Runnable () {
129
                public void run() {
122
        String contentTitle = Utils.getContextDisplayName(context);
130
        String contentTitle = Utils.getContextDisplayName(context);
123
124
        commit(contentTitle, context);
131
        commit(contentTitle, context);
125
    }
132
    }
133
            };
134
            public void perform() {
135
                StatusAction.executeStatus(context, this);
136
                SwingUtilities.invokeLater(doCommit);
137
            }
138
        };
139
        support.start(rp, root.getAbsolutePath(), org.openide.util.NbBundle.getMessage(CommitPanel.class, "LBL_Refresh_Progress")); // NOI18N;
140
    }
126
141
127
    public static void commit(String contentTitle, final VCSContext ctx) {
142
    public static void commit(String contentTitle, final VCSContext ctx) {
128
        FileStatusCache cache = Mercurial.getInstance().getFileStatusCache();
143
        FileStatusCache cache = Mercurial.getInstance().getFileStatusCache();

Return to bug 135672
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo