Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update UpdateUpdater.java (Fail build when locked file instead of fresh check out. This is helpful when repositories are very large and takes hours for fresh check out.) #180

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/main/java/hudson/scm/subversion/UpdateUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,12 @@ public List<External> perform() throws IOException, InterruptedException {
SVNErrorCode errorCode = cause.getErrorMessage().getErrorCode();
if (errorCode == SVNErrorCode.WC_LOCKED) {
// work space locked. try fresh check out
listener.getLogger().println("Workspace appear to be locked, so getting a fresh workspace");
return delegateTo(new CheckoutUpdater());
//listener.getLogger().println("Workspace appear to be locked, so getting a fresh workspace");
//return delegateTo(new CheckoutUpdater());

//show error instead of check out, useful for big repositories
listener.getLogger().println("Workspace appear to be locked, so Failing the build");
throw (InterruptedException) new InterruptedException().initCause(e);
}
if (errorCode == SVNErrorCode.WC_OBSTRUCTED_UPDATE) {
// HUDSON-1882. If existence of local files cause an update to fail,
Expand Down