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.
Summary: | NPE on cloning local repository (at org.netbeans.modules.mercurial.ui.clone.CloneAction.performClone) | ||
---|---|---|---|
Product: | versioncontrol | Reporter: | dlipin <dlipin> |
Component: | Mercurial | Assignee: | issues@versioncontrol <issues> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=22292 | ||
Issue Type: | DEFECT | Exception Reporter: | 22292 |
Attachments: |
stacktrace
stacktrace Proposed patch part 1 Proposed patch rev2 |
Description
dlipin
2008-01-25 14:12:26 UTC
Created attachment 55565 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200801241217) VM: Java HotSpot(TM) Client VM, 1.5.0_13-b05 OS: Windows XP, 5.1, x86 User Comments: Created attachment 55566 [details]
stacktrace
I cloned main netbeans repository (http://hg.netbeans.org/main) to d:\hg using NetBeans mercirual plugin. After that I right-click on the repository folder (in Favotires tab) and call Mercirial->Clone - main Source repository field is not editable and it is D:\hg\main I leave parent directory the default (D:\hg) I leave the clone name the default (main_clone0) I click on Clone button and got the attached NPE. Hg is of version 0.9.5. I have no open projects, I do all the things from "Favorites" tab. When you do the clone from the Favorites menu the problem is we are making a call to org.netbeans.api.project.Project getProject(), but this is failing as main is not an NetBeans project and this is not handled correctly in the performClone(). Another issue is that if we handle this issue and do the clone, I see lots of calls to annotateNameHtml() and isIgnored called Sharability which is also calling findProject that is throwing exceptions. We'll need to look into this. I've attached a patch for the first issue. Created attachment 55575 [details]
Proposed patch part 1
Adding patch which handles cloning of local projects without complete checkin of all NB project files and cloning of folder in Favorites with nested NB projects. Created attachment 55601 [details]
Proposed patch rev2
IDE:------------------------------------------------- IDE: [26/01/08 08:57] Committing started Checking in ui/clone/Bundle.properties; /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/Bundle.properties,v <-- Bundle.properties new revision: 1.19; previous revision: 1.18 done Checking in ui/clone/CloneAction.java; /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java,v <-- CloneAction.java new revision: 1.20; previous revision: 1.19 done Checking in ui/clone/ProjectUtilities.java; /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/ProjectUtilities.java,v <-- ProjectUtilities.java new revision: 1.2; previous revision: 1.1 done Checking in ui/clone/CloneCompleted.java; /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneCompleted.java,v <-- CloneCompleted.java new revision: 1.2; previous revision: 1.1 done Checking in util/HgProjectUtils.java; /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgProjectUtils.java,v <-- HgProjectUtils.java new revision: 1.12; previous revision: 1.11 done IDE: [26/01/08 08:58] Committing finished I checked in my changes to CVS Head, after the Jan 26 6pm PST cut off for the migration to Mercurial repository. I'll reapply the changes on Monday to the Mercurial repository. I checked in my changes to CVS Head, after the Jan 25 6pm PST cut off for the migration to Mercurial repository. I'll reapply the changes on Monday to the Mercurial repository. Patch was reapplied to Hg: http://hg.netbeans.org/main/rev/d01b202a9448 Verified on build 200801300005 (available only on smetiste now). Thanks! *** Issue 125466 has been marked as a duplicate of this issue. *** |