1

I'm trying to configure Hudson to checkout my site's sources from Mercurial but it throws an exception. The /var/lib/hudson/jobs/jobname directory does exist, and I can create a workspace directory in there (even after su hudson), but as soon as I run the Hudson job again this directory disappears and the job ends with the same error:

java.io.IOException: Cannot run program "hg" (in directory "/var/lib/hudson/jobs/jobname/workspace"): java.io.IOException: error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
    at hudson.Proc$LocalProc.<init>(Proc.java:192)
    at hudson.Proc$LocalProc.<init>(Proc.java:164)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:639)
    at hudson.Launcher$ProcStarter.start(Launcher.java:274)
    at hudson.Launcher$ProcStarter.join(Launcher.java:281)
    at hudson.plugins.mercurial.MercurialSCM.joinWithPossibleTimeout(MercurialSCM.java:298)
    at hudson.plugins.mercurial.HgExe.popen(HgExe.java:191)
    at hudson.plugins.mercurial.HgExe.tip(HgExe.java:171)
    at hudson.plugins.mercurial.MercurialSCM.calcRevisionsFromBuild(MercurialSCM.java:254)
    at hudson.scm.SCM._calcRevisionsFromBuild(SCM.java:304)
    at hudson.model.AbstractProject.calcPollingBaseline(AbstractProject.java:1183)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1172)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:499)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:415)
    at hudson.model.Run.run(Run.java:1362)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:145)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
    at java.lang.ProcessImpl.start(ProcessImpl.java:65)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)

Running on Debian 6.0.1

I wonder if anyone has ran into this before, and hopefully solved it?

1 Answer 1

1

Duh, I overlooked this message in the output:

$ hg clone --rev default http://frodo/cgi-bin/hgwebdir.cgi/projectname "/var/lib/hudson/jobs/jobname/workspace" abort: unknown revision 'default'!

I had run hg init on the project, but not hg add and hg commit, so there was nothing to clone!

After adding and committing the files all went well....

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .