mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
if the workspace is locked, wipe out and retry.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9456 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
7db8f87c98
commit
2e243b8841
1 file changed
+8
-1
@@ -356,7 +356,7 @@ public class SubversionSCM extends SCM implements Serializable {
|
||||
private final ISVNAuthenticationProvider authProvider;
|
||||
private final Date timestamp;
|
||||
// true to "svn update", false to "svn checkout".
|
||||
private final boolean update;
|
||||
private boolean update;
|
||||
private final TaskListener listener;
|
||||
private final ModuleLocation[] locations;
|
||||
|
||||
@@ -383,6 +383,13 @@ public class SubversionSCM extends SCM implements Serializable {
|
||||
svnuc.doUpdate(new File(ws, l.local).getCanonicalFile(), revision, true);
|
||||
|
||||
} catch (final SVNException e) {
|
||||
if(e.getErrorMessage().getErrorCode()== SVNErrorCode.WC_LOCKED) {
|
||||
// work space locked. try fresh check out
|
||||
listener.getLogger().println("Workspace appear to be locked, so getting a fresh workspace");
|
||||
update = false;
|
||||
return invoke(ws,channel);
|
||||
}
|
||||
|
||||
e.printStackTrace(listener.error("Failed to update "+l.remote));
|
||||
// trouble-shooting probe for #591
|
||||
if(e.getErrorMessage().getErrorCode()== SVNErrorCode.WC_NOT_LOCKED) {
|
||||
|
||||
Reference in new issue
Block a user