Source:
private void runPushOperation() { if (!pool.requestRunway(this)) { if (!canceled) { log.info("Rescheduling replication to " + uri + " to avoid collision with an in-flight push."); pool.reschedule(this, Destination.RetryReason.COLLISION); } return; } try { git = gitManager.openRepository(projectName); runImpl(); } catch (RepositoryNotFoundException e) { wrappedLog.error("Cannot replicate " + projectName + "; Local repository error: " + e.getMessage(), getStatesAsArray()); } catch (RemoteRepositoryException e) { final String msg = e.getMessage(); if (msg.contains("access denied")) { createRepository(); } else { log.error("Cannot replicate " + projectName + "; Remote repository error: " + msg); } } catch (NoRemoteRepositoryException e) { createRepository(); } catch (NotSupportedException e) { wrappedLog.error("Cannot replicate to " + uri, e, getStatesAsArray()); } catch (TransportException e) { Throwable cause = e.getCause(); if (cause instanceof JSchException && cause.getMessage().startsWith("UnknownHostKey:")) { log.error("Cannot replicate to " + uri + ": " + cause.getMessage()); } else if (e instanceof LockFailureException) { lockRetryCount++; log.error("Cannot replicate to " + e.getMessage()); } else { log.error("Cannot replicate to " + uri, e); } if (lockRetryCount <= maxLockRetries) { pool.reschedule(this, Destination.RetryReason.TRANSPORT_ERROR); } else { log.error("Giving up after " + lockRetryCount + " attempts to replicate. Failing due to: " + e.getMessage()); } } catch (IOException e) { wrappedLog.error("Cannot replicate to " + uri, e, getStatesAsArray()); } catch (RuntimeException e) { wrappedLog.error("Unexpected error during replication to " + uri, e, getStatesAsArray()); } catch (Error e) { wrappedLog.error("Unexpected error during replication to " + uri, e, getStatesAsArray()); } finally { if (git != null) { git.close(); } pool.notifyFinished(this); } }

Target:
private void runPushOperation() { if (!pool.requestRunway(this)) { if (!canceled) { log.info("Rescheduling replication to " + uri + " to avoid collision with an in-flight push."); pool.reschedule(this, Destination.RetryReason.COLLISION); } return; } try { git = gitManager.openRepository(projectName); runImpl(); } catch (RepositoryNotFoundException e) { wrappedLog.error("Cannot replicate " + projectName + "; Local repository error: " + e.getMessage(), getStatesAsArray()); } catch (RemoteRepositoryException e) { final String msg = e.getMessage(); if (msg.contains("access denied")) { createRepository(); } else { log.error("Cannot replicate " + projectName + "; Remote repository error: " + msg); } } catch (NoRemoteRepositoryException e) { createRepository(); } catch (NotSupportedException e) { wrappedLog.error("Cannot replicate to " + uri, e, getStatesAsArray()); } catch (TransportException e) { Throwable cause = e.getCause(); if (cause instanceof JSchException && cause.getMessage().startsWith("UnknownHostKey:")) { log.error("Cannot replicate to " + uri + ": " + cause.getMessage()); } else if (e instanceof LockFailureException) { lockRetryCount++; log.error("Cannot replicate to " + e.getMessage()); if (lockRetryCount <= maxLockRetries) { pool.reschedule(this, Destination.RetryReason.TRANSPORT_ERROR); } else { log.error("Giving up after " + lockRetryCount + " attempts to replicate. Failing due to: " + e.getMessage()); } } else { log.error("Cannot replicate to " + uri, e); pool.reschedule(this, Destination.RetryReason.TRANSPORT_ERROR); } } catch (IOException e) { wrappedLog.error("Cannot replicate to " + uri, e, getStatesAsArray()); } catch (RuntimeException e) { wrappedLog.error("Unexpected error during replication to " + uri, e, getStatesAsArray()); } catch (Error e) { wrappedLog.error("Unexpected error during replication to " + uri, e, getStatesAsArray()); } finally { if (git != null) { git.close(); } pool.notifyFinished(this); } }