Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 123787 - Annotate fails
Annotate fails
Status: RESOLVED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
6.x
All All
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
issues@versioncontrol
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-11 00:08 UTC by Jesse Glick
Modified: 2008-01-03 09:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Log file (84.46 KB, text/plain)
2007-12-11 00:08 UTC, Jesse Glick
Details
Proposed patch (1.26 KB, text/plain)
2007-12-11 21:25 UTC, John Rice
Details
Improved patch - clearer if we want to go multiline at some stage (4.72 KB, text/plain)
2007-12-11 21:46 UTC, John Rice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2007-12-11 00:08:24 UTC
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.
Comment 1 Jesse Glick 2007-12-11 00:08:51 UTC
Created attachment 54122 [details]
Log file
Comment 2 Jesse Glick 2007-12-11 00:10:47 UTC
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)
Comment 3 John Rice 2007-12-11 14:01:13 UTC
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 ??
Comment 4 John Rice 2007-12-11 14:17:41 UTC
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.

Comment 5 John Rice 2007-12-11 14:41:53 UTC
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.
Comment 6 John Rice 2007-12-11 17:12:55 UTC
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
Comment 7 Jesse Glick 2007-12-11 19:37:59 UTC
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.)
Comment 8 John Rice 2007-12-11 21:20:39 UTC
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.
Comment 9 John Rice 2007-12-11 21:25:35 UTC
Created attachment 54166 [details]
Proposed patch
Comment 10 John Rice 2007-12-11 21:46:40 UTC
Created attachment 54169 [details]
Improved patch - clearer if we want to go multiline at some stage
Comment 11 John Rice 2007-12-11 21:50:51 UTC
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
Comment 12 Jesse Glick 2007-12-11 22:45:57 UTC
Thanks, patch looks right to me.


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