Issue Type: Bug Bug
Affects Versions: current
Assignee: Kohsuke Kawaguchi
Components: mercurial
Created: 30/Aug/12 8:54 PM
Description:
  1. Install a Windows master node and OSX slave node.
  2. Invoke a task on the slave with Mercurial "repository caching" enabled.
  3. I get this output:
$ /usr/local/bin/hg clone --noupdate <repository> C:\Users\Gili\.jenkins\hgcache\37CF2BD3BA29C01DED84F6376395B553ABB57E93-vtlr
ERROR: Failed to use repository cache for <repository>
java.io.IOException: Cannot run program "/usr/local/bin/hg": CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessBuilder.start(Unknown Source)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
	at hudson.Launcher$ProcStarter.start(Launcher.java:338)
	at hudson.Launcher$ProcStarter.join(Launcher.java:345)
	at hudson.plugins.mercurial.MercurialSCM.joinWithPossibleTimeout(MercurialSCM.java:309)
	at hudson.plugins.mercurial.Cache.repositoryCache(Cache.java:103)
	at hudson.plugins.mercurial.MercurialSCM.cachedSource(MercurialSCM.java:687)
	at hudson.plugins.mercurial.MercurialSCM.clone(MercurialSCM.java:558)
	at hudson.plugins.mercurial.MercurialSCM.checkout(MercurialSCM.java:390)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
	at hudson.model.Run.execute(Run.java:1502)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:236)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
	... 19 more
$ /usr/local/bin/hg clone --rev default --noupdate <repository> <workspace>
adding changesets
adding manifests
adding file changes
added 5 changesets with 154 changes to 103 files
...snip...

I see two problems with this output:

  1. The "hgcache" path being defined relative to the master node's root directory instead of the root directory of the slave. There is no way this will work.
  2. ProcessBuilder complains it can't run "/usr/local/bin/hg" because "The system cannot find the file specified". I believe it finds "hg" because I've confirmed the path exists and the log clearly shows "hg clone" working. Please modify the code to output more verbose information (what is the working directory and full path associated with ProcessBuilder?)
Environment: MacOS X 10.7
Project: Jenkins
Priority: Major Major
Reporter: cowwoc
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to