Skip to content

Commit

Permalink
[JENKINS-11877] Don't attempt changelog calculation if clone/update f…
Browse files Browse the repository at this point in the history
…ailed
  • Loading branch information
davidmc24 committed Dec 4, 2011
1 parent a3735a5 commit f06a86a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/main/java/hudson/plugins/mercurial/MercurialSCM.java
Expand Up @@ -385,14 +385,16 @@ public boolean checkout(AbstractBuild<?,?> build, Launcher launcher, FilePath wo
success = clone(build, launcher, repository, listener);
}

try {
determineChanges(build, launcher, listener, changelogFile, repository);
return success;
} catch (IOException e) {
listener.error("Failed to capture change log");
e.printStackTrace(listener.getLogger());
return false;
}
if (success) {
try {
determineChanges(build, launcher, listener, changelogFile, repository);
} catch (IOException e) {
listener.error("Failed to capture change log");
e.printStackTrace(listener.getLogger());
success = false;

This comment has been minimized.

Copy link
@kutzi

kutzi Dec 4, 2011

Member

As discussed in the pull request on core, using the return boolean as error indicator is considered deprecated

}
}
return success;
}

private boolean canReuseWorkspace(FilePath repo,
Expand Down

0 comments on commit f06a86a

Please sign in to comment.