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.
After creating a small Hg repo using hg convert, I opened a file in the NB editor and tried to get annotations. Numerous exceptions were thrown. 'hg ann' on the command line works fine.
Created attachment 54122 [details] Log file
Trying to get history also throws an NPE: SEVERE [org.openide.util.RequestProcessor] java.lang.NullPointerException at org.netbeans.modules.mercurial.ui.log.LogAction$1.perform(LogAction.java:152) at org.netbeans.modules.mercurial.HgProgressSupport.performIntern(HgProgressSupport.java:96) at org.netbeans.modules.mercurial.HgProgressSupport.run(HgProgressSupport.java:89) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
J - can you give me details of version of Hg you are running, version of Mercurial plugin (are you running from Head) and version of Linux. I see 2.6.22 kernel, but what are the details, Ubuntu ??
J - what is hg convert?? Could you post the converted project you are opening, so I can try and repo it here. Is this a NetBeans porject or something else? I am running on Ubuntu Feisty, hg 0.9.3, latest plugin from Head and the plugin is working, though I do see an exception raised on initialization that can be ignored, but needs to be fixed.
Sussed out the Exception on hg init. It's an extension problem with the version of hg I'm using. See same output from command line. Just needed to comment out the in /etc/mercurial/hgrc.d/hgrc the refs to hgext/hgk and hgext/hbisect to stop hg init outputing errors. Still don't know what's going on with your project though.
J - another data point from NB QE: Mercurial plugin 1.4.2 tested on Fedora Core 3, hg 0.9.3 and haven't encountered issue: Initialize, Show Annotations, Commit, Rollback, Push ... everything works
Hg 0.9.5, the current release (please always test with this!); and the latest available Hg plugin from dev AU, which you can also see in my log file. Ubuntu, though it probably doesn't matter. 'hg convert' is the bundled extension which converts some other SCM's data to Hg format; in this case, a small CVS test repo. I'm not about to attach the test repo since it's some 9+ megs; was just created by translating ant.netbeans.org CVS content to Hg, and I opened BridgeImpl.java from that. Easily reproduced today as well. From looking at the code in question (toHgLogMessages), it is clear that it is wrong; multiline commit messages break it. {desc} should be {desc|firstline} in HgCommand.HG_LOG_TEMPLATE_CMD, at least if you want to reliably parse the result. (Or you could use |tabindent if you really wanted to get multiline commit messages, at the expense of a slightly more complicated parser.)
Thanks - I test with 0.9.5 on Windows and OpenSolaris. On linux I just grabbed a box that had Ubuntu Feisty on it so grabbed the 0.9.3 rpm for that from Mercurial. Checked out the error as you pointed out and see the failure in the toHgLogMessages() on the multiline commit. Simplest fix is as you say just add in the (date|firstline), if Padraig is keen to support multiline annotation I'll let him change it when he's back in, but think for annotation, single line commit message is not just simpler, it makes more sense.
Created attachment 54166 [details] Proposed patch
Created attachment 54169 [details] Improved patch - clearer if we want to go multiline at some stage
Committed to Head: IDE:------------------------------------------------- IDE: [11/12/07 21:48] Committing started Checking in ui/annotate/AnnotateAction.java; /cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/annotate/AnnotateAction.java,v <-- AnnotateAction.java new revision: 1.7; previous revision: 1.6 done Checking in util/HgCommand.java; /cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java,v <-- HgCommand.java new revision: 1.60; previous revision: 1.59 done IDE: [11/12/07 21:49] Committing finished
Thanks, patch looks right to me.