Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 123787 - Annotate fails
Annotate fails
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
All All
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
Depends on:
  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

Log file (84.46 KB, text/plain)
2007-12-11 00:08 UTC, Jesse Glick
Proposed patch (1.26 KB, text/plain)
2007-12-11 21:25 UTC, John Rice
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

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]
	at org.netbeans.modules.mercurial.ui.log.LogAction$1.perform(
	at org.netbeans.modules.mercurial.HgProgressSupport.performIntern(
	at org.openide.util.RequestProcessor$
[catch] at org.openide.util.RequestProcessor$
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
CVS content to Hg, and I opened 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: [11/12/07 21:48] Committing started
Checking in ui/annotate/;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/ui/annotate/,v  <--
new revision: 1.7; previous revision: 1.6
Checking in util/;
/cvs/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/,v  <--
new revision: 1.60; previous revision: 1.59
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