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 164301

Summary: Getting diff fail by org.netbeans.modules.hudson.mercurial.MercurialHyperlink.findParent()
Product: connecteddeveloper Reporter: Masaki Katakai <masaki>
Component: HudsonAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Masaki Katakai 2009-05-02 03:03:50 UTC
Product Version: NetBeans IDE Dev (Build 200904301401)
Java: 1.6.0_07; Java HotSpot(TM) 64-Bit Server VM 1.6.0_07-b06-57
System: Mac OS X version 10.5.6 running on x86_64; SJIS; en (nb)

1. add http://deadlock.netbeans.org/hudson/
2. click on trunk build and select "Show Changes" from context menu
3. click on the link for file 
   On status area, "Loading diff for hudson..." is displayed but
   no diff window appears.

The following exception in IDE log file.

INFO [org.netbeans.modules.hudson.mercurial.MercurialHyperlink]
java.io.IOException: No parent rev spec found
        at org.netbeans.modules.hudson.mercurial.MercurialHyperlink.findParent(MercurialHyperlink.java:152)
Caused: java.io.IOException: Could not parse http://hg.netbeans.org/main/raw-rev/f1748d402d632d3b92cd66585f122c9085f83c7f
        at org.netbeans.modules.hudson.mercurial.MercurialHyperlink.findParent(MercurialHyperlink.java:155)
        at org.netbeans.modules.hudson.mercurial.MercurialHyperlink.makeSource(MercurialHyperlink.java:113)
        at org.netbeans.modules.hudson.mercurial.MercurialHyperlink.access$000(MercurialHyperlink.java:71)
[catch] at org.netbeans.modules.hudson.mercurial.MercurialHyperlink$1.run(MercurialHyperlink.java:90)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:576)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1013)
Comment 1 Jesse Glick 2009-05-05 19:19:29 UTC
I think due to Hg upgrade; will check this patch:

diff --git a/hudson.mercurial/src/org/netbeans/modules/hudson/mercurial/MercurialHyperlink.java
b/hudson.mercurial/src/org/netbeans/modules/hudson/mercurial/MercurialHyperlink.java
--- a/hudson.mercurial/src/org/netbeans/modules/hudson/mercurial/MercurialHyperlink.java
+++ b/hudson.mercurial/src/org/netbeans/modules/hudson/mercurial/MercurialHyperlink.java
@@ -128,7 +128,7 @@
     }
 
     private static final Map<String,String> parents = new HashMap<String,String>();
-    private static final Pattern PARENT_COMMENT = Pattern.compile("# Parent ([0-9a-f]{40})"); // NOI18N
+    private static final Pattern PARENT_COMMENT = Pattern.compile("# Parent +([0-9a-f]{40})"); // NOI18N
     private static synchronized String findParent(URI repo, String node) throws IOException {
         String parent = parents.get(node);
         if (parent == null) {
Comment 2 Jesse Glick 2009-05-14 05:13:01 UTC
cdev #7bc68aa9dc1f
Comment 3 Quality Engineering 2009-05-14 19:03:34 UTC
Integrated into 'main-golden', will be available in build *200905141401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7bc68aa9dc1f
User: Jesse Glick <jglick@netbeans.org>
Log: #164301: slight format change in newer Hg servers.