Skip to content
Permalink
Browse files
[JENKINS-14575] Wrap GitException into IOException
Do the same if the repo exists and don't have to clone.
  • Loading branch information
Adam PAPAI committed Mar 28, 2013
1 parent d82a9f3 commit 33e66e1bfae8ddaca3fd799394461f3328f2358f
Showing 1 changed file with 7 additions and 2 deletions.
@@ -973,12 +973,17 @@ public Collection<Revision> invoke(File localWorkspace, VirtualChannel channel)

boolean fetched = false;
for (RemoteConfig remoteRepository : repos) {
fetched |= fetchFrom(git, listener, remoteRepository);
try {
fetched |= fetchFrom(git, listener, remoteRepository);
} catch (GitException e) {
fetched |= false;
}
}

if (!fetched) {
listener.error("Could not fetch from any repository");
throw new GitException("Could not fetch from any repository");
// Throw IOException so the retry will be able to catch it
throw new IOException("Could not fetch from any repository");
}
// Do we want to prune first?
if (pruneBranches) {

0 comments on commit 33e66e1

Please sign in to comment.