MercurialHistoryParser error when getting source

13 views
Skip to first unread message

jim_offroadcode

unread,
Aug 3, 2010, 9:45:21 AM8/3/10
to ccnet-user
Wondering if anyone can point me in the direction of a solution for
this problem.

We've been using Cruisecontrol.Net for some time now. Recently we
switched our source control from SVN to Mercurial and haven't had too
many problems until now.

We started getting this error message when building one of our
projects. It seems to be having trouble parsing the Mercurial history.
However i don't have much experience with the internals of
CruiseControl.NEt and am not sure where to start looking.

System.Xml.XmlException: An error occurred while parsing EntityName.
Line 41, position 25588. at
System.Xml.XmlTextReaderImpl.Throw(Exception e) at
System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at
System.Xml.XmlTextReaderImpl.Throw(String res) at
System.Xml.XmlTextReaderImpl.ParseEntityName() at
System.Xml.XmlTextReaderImpl.ParseEntityReference() at
System.Xml.XmlTextReaderImpl.Read() at
System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at
System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader)
at Exortech.NetReflector.Util.XmlUtil.ReadNode(XmlReader reader) at
Exortech.NetReflector.NetReflectorReader.Read(XmlReader reader) at
Exortech.NetReflector.NetReflectorReader.Read(TextReader reader) at
Exortech.NetReflector.NetReflectorReader.Read(String xml) at
Exortech.NetReflector.NetReflector.Read(String xml) at
ThoughtWorks.CruiseControl.Core.Sourcecontrol.Mercurial.MercurialHistoryParser.Parse(TextReader
history, DateTime from, DateTime to) at
ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.ParseModifications(ProcessResult
result, DateTime from, DateTime to) at
ThoughtWorks.CruiseControl.Core.Sourcecontrol.Mercurial.Mercurial.GetModifications(IIntegrationResult
from, IIntegrationResult to) at
ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl
sourceControl, IIntegrationResult lastBuild, IIntegrationResult
thisBuild) at
ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult
from, IIntegrationResult to) at
ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest
request)
Message has been deleted

Bill Barry

unread,
Aug 3, 2010, 10:50:40 AM8/3/10
to ccnet...@googlegroups.com
I suspect you have an invalid character in your log for a commit that it
is trying to parse.

I did a somewhat nasty trick to get hg log output formatted in an easy
to parse manner:
hg log --template
"<modification><node>{node|short}</node><author>{author|user}</author><date>{date|rfc822date}</date><desc>{desc|escape}</desc><rev>{rev}</rev><email>{author|email|obfuscate}</email><files>{files}</files></modification>"

This gets hg to output "pseudo-xml" which I then parsed with the
Exortech.NetReflector parser.

Try finding the invalid character that caused this and then we can see
what can be done.

jim_offroadcode

unread,
Aug 3, 2010, 12:15:07 PM8/3/10
to ccnet-user
Thanks Bill.

I was wondering whether that could potentially be a problem....

I've run the hg log command and wrapped the template option in
quotes. However when I've run the command from a console and checked
the validity of the XML I can find no problem characters and nothing
appears to be invalid (if i run the command in a console without the
quotes i get "< was unexpected at this time"). You said you wrapped
the template option in quotes which returned XML which the
Exortech.NetReflector parser can parse. How would i go about this?

Jim
Reply all
Reply to author
Forward
0 new messages