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 + "; " + e.getMessage(), getStatesAsArray()); } catch (RemoteRepositoryException e) { log.error("Cannot replicate " + projectName + "; " + e.getMessage()); } catch (NoRemoteRepositoryException e) { if (pool.isCreateMissingRepos()) { try { createRepository(); log.warn("Missing repository created; retry replication to " + uri); pool.reschedule(this, Destination.RetryReason.REPOSITORY_MISSING); } catch (IOException ioe) { wrappedLog.error("Cannot replicate to " + uri + "; repository not found", getStatesAsArray()); } } else { wrappedLog.error("Cannot replicate to " + uri + "; repository not found", getStatesAsArray()); } } 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 { 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); } }

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 + "; " + e.getMessage(), getStatesAsArray()); } catch (RemoteRepositoryException e) { log.error("Cannot replicate " + projectName + "; " + e.getMessage()); } catch (NoRemoteRepositoryException e) { if (pool.isCreateMissingRepos()) { try { createRepository(); log.warn("Missing repository created; retry replication to " + uri); pool.reschedule(this, Destination.RetryReason.REPOSITORY_MISSING); } catch (IOException ioe) { wrappedLog.error("Cannot replicate to " + uri + "; failed to create missing repository", ioe, getStatesAsArray()); } } else { wrappedLog.error("Cannot replicate to " + uri + "; repository not found", getStatesAsArray()); } } 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 { 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); } }