Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Automatic builds with Mercurial



  • I'm running into an interesting issue. We host all our source in Mercurial. I initially setup a hook on our main repository to post to BuildMaster, but that created an infinite build when we started trying to label things. So, I've tried setting up a monitoring schedule, but I'm getting the following exceptions.

    Unhandled Exception: System.FormatException: Input string was not in a correct format.

    Server stack trace:
    at Inedo.BuildMaster.Util.Persistence.ExecuteMethodOnXmlPersistedObject(String objectXml, String methodName, Object[] parameters)
    at Inedo.BuildMaster.Extensibility.Agents.Local.LocalAgent.Inedo.BuildMaster.Extensibility.Agents.IPersistedObjectExecuter.ExecuteMethodOnXmlPersistedObject(String objectXml, String methodName, Object[] parameters)
    at Inedo.BuildMaster.Proxies.AgentProxy`1.ProxyExecute(IMethodCallMessage methodCallMessage)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at Inedo.BuildMaster.Extensibility.Providers.SourceControl.IRevisionProvider.GetCurrentRevision(String path)
    at Inedo.BuildMaster.Windows.ServiceApplication.ScheduleExecuter.ExecuteScmTriggered(Int32 buildScheduleId, Int32 applicationId, Int32 sourceControlProviderId, String path, String applicationName, Int32 quietPeriodMinutes)
    at Inedo.BuildMaster.Windows.ServiceApplication.ScheduleExecuter.<Execute>b__8(Object args)

    Server stack trace:
    at Inedo.BuildMaster.Util.Persistence.ExecuteMethodOnXmlPersistedObject(String objectXml, String methodName, Object[] parameters)
    at Inedo.BuildMaster.Extensibility.Agents.Local.LocalAgent.Inedo.BuildMaster.Extensibility.Agents.IPersistedObjectExecuter.ExecuteMethodOnXmlPersistedObject(String objectXml, String methodName, Object[] parameters)
    at Inedo.BuildMaster.Proxies.AgentProxy`1.ProxyExecute(IMethodCallMessage methodCallMessage)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at Inedo.BuildMaster.Extensibility.Providers.SourceControl.IRevisionProvider.GetCurrentRevision(String path)
    at Inedo.BuildMaster.Windows.ServiceApplication.ScheduleExecuter.ExecuteScmTriggered(Int32 buildScheduleId, Int32 applicationId, Int32 sourceControlProviderId, String path, String applicationName, Int32 quietPeriodMinutes)
    at Inedo.BuildMaster.Windows.ServiceApplication.ScheduleExecuter.<Execute>b__8(Object args)

    Any suggestions?



  • hi Chris,

    What version of BuildMaster and the Mercurial extension are you using?



  • The latest for both.



  • I think I see where the error is occurring, likely when the provider is attempting to parse console output in order to determine whether to create a build or not based on the current revision of the source code in the repository. Can you tell me which version of Mercurial you're using? (hg --version)

    Also, can you run the following command against the local repo (replacing {relative-path} with the same path you're using for the automatic build path):

    hg log -y -v -l 1 "{relative-path}"

    and paste the full output here?



  • I'm having the same issue, here's the info I get for the requested commands.

    C:\Users\Bryan>hg --version
    Mercurial Distributed SCM (version 2.7)
    (see http://mercurial.selenic.com for more information)

    Copyright (C) 2005-2013 Matt Mackall and others
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    C:\Users\Bryan>hg log -y -v -l 1 "D:\ServerFolders\Users\Bryan\Code\QonqrKlaxon"
    changeset: 29:46ac28a41b23
    tag: tip
    user: ***** ******* <@>
    date: Tue Jan 07 21:56:09 2014 -0600
    files: QonqrKlaxon.Services/App.config QonqrKlaxon.Services/AreaZonesDataService.cs QonqrKlaxon.Services/PlayerWithApi.cs QonqrKlaxon.Services/Program.cs QonqrKlaxon.Services
    /QonqrKlaxon.Services.csproj QonqrKlaxon.Services/packages.config
    description:
    Added logging and split PlayerWithApiKey to its own file



  • Thank you Bryan for the additional information - we were able to resolve the issue and have published a new version of the extension.



  • I know this is old but it's still the first thing that comes up in Google when you search for the infinite build issue in BuildMaster.

    The infinite builds are because applying a label is technically a check-in in DVCSs like Mercurial and Git. So when you apply the label BuildMaster sees a new check-in and starts a new build, which applies a new label, which creates a new check-in, ...

    I haven't found a good workaround yet.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation