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.

View | Details | Raw Unified | Return to bug 103144
Collapse All | Expand All

(-)Bundle.properties (+2 lines)
Lines 86-88 Link Here
86
MSG_Move_Progress = Moving ...
86
MSG_Move_Progress = Moving ...
87
MSG_Add_Progress = Adding ...
87
MSG_Add_Progress = Adding ...
88
MSG_NO_PUSH_PULL_PATH = no default
88
MSG_NO_PUSH_PULL_PATH = no default
89
MSG_VERSION_CONFIRM = Confirm Mercurial version
90
MSG_VERSION_CONFIRM_QUERY The version of mercurial found ({0}) is not the version ({1}) supported by the Netbeans Mercurial Plugin..\nDo you want to use this version of mercurial with the plugin?
(-)HgModuleConfig.java (+1 lines)
Lines 40-45 Link Here
40
    public static final String PROP_COMMIT_EXCLUSIONS       = "commitExclusions";                           // NOI18N
40
    public static final String PROP_COMMIT_EXCLUSIONS       = "commitExclusions";                           // NOI18N
41
    public static final String PROP_DEFAULT_VALUES          = "defaultValues";                              // NOI18N
41
    public static final String PROP_DEFAULT_VALUES          = "defaultValues";                              // NOI18N
42
    public static final String PROP_TEXT_ANNOTATIONS_FORMAT = "textAnnotations";                            // NOI18N
42
    public static final String PROP_TEXT_ANNOTATIONS_FORMAT = "textAnnotations";                            // NOI18N
43
    public static final String PROP_RUN_VERSION             = "runVersion";                            // NOI18N
43
    public static final String KEY_EXECUTABLE_BINARY        = "svnExecBinary";                              // NOI18N
44
    public static final String KEY_EXECUTABLE_BINARY        = "svnExecBinary";                              // NOI18N
44
    public static final String KEY_ANNOTATION_FORMAT        = "annotationFormat";                           // NOI18N
45
    public static final String KEY_ANNOTATION_FORMAT        = "annotationFormat";                           // NOI18N
45
            
46
            
(-)Mercurial.java (+23 lines)
Lines 33-38 Link Here
33
import org.openide.filesystems.FileUtil;
33
import org.openide.filesystems.FileUtil;
34
import org.netbeans.modules.mercurial.ui.diff.Setup;
34
import org.netbeans.modules.mercurial.ui.diff.Setup;
35
import org.netbeans.modules.mercurial.util.HgCommand;
35
import org.netbeans.modules.mercurial.util.HgCommand;
36
import org.openide.util.NbBundle;
37
import javax.swing.JOptionPane;
38
import java.util.prefs.Preferences;
36
39
37
/**
40
/**
38
 * Main entry point for Mercurial functionality, use getInstance() to get the Mercurial object.
41
 * Main entry point for Mercurial functionality, use getInstance() to get the Mercurial object.
Lines 73-78 Link Here
73
    private MercurialAnnotator   mercurialAnnotator;
76
    private MercurialAnnotator   mercurialAnnotator;
74
    private MercurialInterceptor mercurialInterceptor;
77
    private MercurialInterceptor mercurialInterceptor;
75
    private FileStatusCache     fileStatusCache;
78
    private FileStatusCache     fileStatusCache;
79
    private HgSettings          settings;
76
    private HashMap<String, RequestProcessor>   processorsToUrl;
80
    private HashMap<String, RequestProcessor>   processorsToUrl;
77
    private boolean goodVersion;
81
    private boolean goodVersion;
78
82
Lines 88-93 Link Here
88
        String version = HgCommand.getHgVersion();
92
        String version = HgCommand.getHgVersion();
89
        if (version != null) {
93
        if (version != null) {
90
            goodVersion = version.startsWith(MERCURIAL_GOOD_VERSION);
94
            goodVersion = version.startsWith(MERCURIAL_GOOD_VERSION);
95
            if (!goodVersion) {
96
                Preferences prefs = HgModuleConfig.getDefault().getPreferences();
97
                String runVersion = prefs.get(HgModuleConfig.PROP_RUN_VERSION, null);
98
                if (runVersion == null || !runVersion.equals(version)) {
99
                    int response = JOptionPane.showOptionDialog(null,
100
                                    NbBundle.getMessage(Mercurial.class,"MSG_VERSION_CONFIRM_QUERY", version, MERCURIAL_GOOD_VERSION),
101
                                    NbBundle.getMessage(Mercurial.class,"MSG_VERSION_CONFIRM"),
102
                                    JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,null, null, null);
103
104
                     if (response == JOptionPane.YES_OPTION) {
105
                         goodVersion = true;
106
                         prefs.put(HgModuleConfig.PROP_RUN_VERSION, version);
107
                     } else {
108
                         prefs.remove(HgModuleConfig.PROP_RUN_VERSION);
109
                     }
110
                } else {
111
                   goodVersion = true;
112
                }
113
            }
91
        } else {
114
        } else {
92
            goodVersion = false;
115
            goodVersion = false;
93
        }
116
        }

Return to bug 103144