提交 c8118af2 编写于 作者: K kohsuke

added another test hook for trouble-shooting issue #167.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1729 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6994fa04
......@@ -135,6 +135,7 @@ public class SubversionSCM extends AbstractCVSFamilySCM {
changelogFileCreated = true;
try {
int r = launcher.launch(cmd,env,os,build.getProject().getWorkspace()).join();
pause(listener);
if(r!=0) {
listener.fatalError("revision check failed");
// report the output
......@@ -203,6 +204,7 @@ public class SubversionSCM extends AbstractCVSFamilySCM {
cmd.add(tokens.nextToken());
result = run(launcher,cmd,listener,workspace);
pause(listener);
if(!result)
return false;
}
......@@ -260,6 +262,7 @@ public class SubversionSCM extends AbstractCVSFamilySCM {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int r = launcher.launch(cmd,env,baos,workspace).join();
pause(listener);
if(r!=0) {
// failed. to allow user to diagnose the problem, send output to log
listener.getLogger().write(baos.toByteArray());
......@@ -339,12 +342,24 @@ public class SubversionSCM extends AbstractCVSFamilySCM {
StringTokenizer tokens = new StringTokenizer(modules);
while(tokens.hasMoreTokens()) {
if(!run(launcher,cmd,listener,new FilePath(remoteDir,getLastPathComponent(tokens.nextToken()))))
boolean result = run(launcher, cmd, listener, new FilePath(remoteDir, getLastPathComponent(tokens.nextToken())));
pause(listener);
if(!result)
return false;
}
return true;
}
private static void pause(TaskListener listener) {
try {
if(pauseBetweenInvocation<=0) return; // do nothing
listener.getLogger().println("Pausing "+pauseBetweenInvocation+"ms");
Thread.sleep(pauseBetweenInvocation);
} catch (InterruptedException e) {
listener.getLogger().println("aborted");
}
}
/**
* Returns true if we can use "svn update" instead of "svn checkout"
*/
......@@ -559,4 +574,10 @@ public class SubversionSCM extends AbstractCVSFamilySCM {
* Debug switch to dump "svn info" output, to troubleshoot issue #167.
*/
public static boolean dumpSvnInfo = false;
/**
* Debug switch that causes Hudson to wait between svn invocation.
* This is a temporary change to trouble-shoot issue #167.
*/
public static int pauseBetweenInvocation = 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册