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.

Bug 103144 - version check should be more optimistic
Summary: version check should be more optimistic
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-02 14:46 UTC by Padraig Obriain
Modified: 2008-01-03 09:39 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
proposed patch (4.21 KB, patch)
2007-05-04 15:05 UTC, Padraig Obriain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Padraig Obriain 2007-05-02 14:46:21 UTC
Currently the version check checks for 0.9.3.

We can take an optimistic approach: check dotted version (ie. 0.9.3) and only
refuse executables that report lower version. Treat higher and unrecognized as
supported.
Comment 1 John Rice 2007-05-02 15:14:14 UTC
If it's less than 0.9.3:
Tell user in a popup that the version is unsupported, Mercurial support is
disabled and to enable it they must install 0.9.3. Persist this notification and
perhaps set the Mercurial submenu to have just one "unsupported" entry. Better
solution would be to not show the Mercurial menu at all, but unsure at preset
how to do this.

If it's == 0.9.3:
Good to go :)

If it's > than 0.9.3:
Tell user in a popup that the version is unsupported, 0.9.3 is the only
supported version, but this version may work. Persist this notification.
Mercurial menu is enabled but actions may have unpredictable results.

To support the persistence even though we are not yet supporting Mecurial
Properties we could setup a HgSettings.java class with serialization support.
For now it's only getter/setter would be the boolean versionNotificationRun.
Comment 2 Padraig Obriain 2007-05-04 15:03:55 UTC
I am not sure how we can distinguish between a version which is less than 0.9.3
and a version which is greater than 0.9.3.

I have prepared a patch 

It checks whether the version found is the same as the version we tested against.
If not, a dialog is presented. If the user wishes to proceed the version is stored 
in preferences so it persists.

I have noticed that Mercurial is initialized twice during startup so that if the
user answer no in the dialog the question is asked again.

To test this either use a version of mercurial different from 0.9.3 or change
MERCURIAL_GOOD_VERSION to 0.9.2. 
Comment 3 Padraig Obriain 2007-05-04 15:05:29 UTC
Created attachment 42140 [details]
proposed patch
Comment 4 Padraig Obriain 2007-05-08 12:23:29 UTC
Patch committed