Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 126009 - NPE on cloning local repository (at org.netbeans.modules.mercurial.ui.clone.CloneAction.performClone)
NPE on cloning local repository (at org.netbeans.modules.mercurial.ui.clone.C...
Status: VERIFIED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
6.x
All All
: P2 (vote)
: TBD
Assigned To: issues@versioncontrol
issues@versioncontrol
http://statistics.netbeans.org/except...
EXCEPTIONS_REPORT
:
: 125466 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-25 14:12 UTC by dlipin
Modified: 2008-02-07 11:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (2.21 KB, text/plain)
2008-01-25 14:12 UTC, dlipin
Details
stacktrace (2.21 KB, text/plain)
2008-01-25 14:16 UTC, dlipin
Details
Proposed patch part 1 (1.08 KB, text/plain)
2008-01-25 15:34 UTC, John Rice
Details
Proposed patch rev2 (7.94 KB, text/plain)
2008-01-26 08:55 UTC, John Rice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dlipin 2008-01-25 14:12:26 UTC
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: 
I cloned the main repository (http://hg.netbeans.org/main) to local dist (d:\hg)
After that I tried to clone the d:\hg to another location (d:\work\working) and got this exception on pushing "Clone" button.
Comment 1 dlipin 2008-01-25 14:12:31 UTC
Created attachment 55565 [details]
stacktrace
Comment 2 dlipin 2008-01-25 14:15:57 UTC
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: 
Comment 3 dlipin 2008-01-25 14:16:00 UTC
Created attachment 55566 [details]
stacktrace
Comment 4 dlipin 2008-01-25 14:42:05 UTC
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.
Comment 5 John Rice 2008-01-25 15:32:49 UTC
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.

Comment 6 John Rice 2008-01-25 15:34:20 UTC
Created attachment 55575 [details]
Proposed patch part 1
Comment 7 John Rice 2008-01-26 08:54:13 UTC
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.
Comment 8 John Rice 2008-01-26 08:55:50 UTC
Created attachment 55601 [details]
Proposed patch rev2
Comment 9 John Rice 2008-01-26 08:58:46 UTC
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
Comment 10 John Rice 2008-01-26 15:52:32 UTC
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.
Comment 11 John Rice 2008-01-26 15:57:13 UTC
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.
Comment 12 Jesse Glick 2008-01-26 22:29:27 UTC
Patch was reapplied to Hg:

http://hg.netbeans.org/main/rev/d01b202a9448
Comment 13 dlipin 2008-01-30 11:59:50 UTC
Verified on build 200801300005 (available only on smetiste now).
Thanks!
Comment 14 Padraig Obriain 2008-02-07 11:12:36 UTC
*** Issue 125466 has been marked as a duplicate of this issue. ***


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