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 124966 - NullPointerException when click Revert button
Summary: NullPointerException when click Revert button
Status: VERIFIED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@versioncontrol
URL: http://statistics.netbeans.org/analyt...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-09 15:45 UTC by Jiri Skrivanek
Modified: 2008-01-18 07:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (1.23 KB, text/plain)
2008-01-16 17:04 UTC, John Rice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2008-01-09 15:45:29 UTC
NPE is thrown when you click Revert button and revisions are not yet resolved. To reproduce:

- open a file versioned in Mercurial
- make a local change and save file
- call "Mercurial|Revert Modifications" and immediatelly click Revert button. The exception is thrown probably because
combo box with revisions is not yet populated.

Mercurial Pluging: 1.4.3.42.1
Mercurial Runtime: 0.9.5
Product Version: NetBeans IDE Dev (Build 20080109120642)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Userdir: D:\Development\builds\nbUserdir-Hg
Comment 1 John Rice 2008-01-16 16:57:50 UTC
Can't reproduce - can you attach a stack trace.
Comment 2 John Rice 2008-01-16 17:04:51 UTC
Created attachment 55159 [details]
Proposed patch
Comment 3 John Rice 2008-01-16 17:06:39 UTC
Checked to see where this could be arising and have added check for null revision string. The revert will still work but
it will just default to the following action:

    With no revision specified, revert the named files or directories
    to the contents they had in the parent of the working directory.
Comment 4 John Rice 2008-01-16 17:09:46 UTC
IDE:-------------------------------------------------
IDE: [16/01/08 17:09] Committing started
Checking in RevertModificationsPanel.java;
/shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/update/RevertModificationsPanel.java,v
 <--  RevertModificationsPanel.java
new revision: 1.8; previous revision: 1.7
done
IDE: [16/01/08 17:09] Committing finished
IDE: [16/01/08 17:09] Diffing finished
Comment 5 Jiri Skrivanek 2008-01-18 07:26:23 UTC
Verified.