push.setTimeout(timeout.toInteger());
.setProgressMonitor(NullProgressMonitor.INSTANCE) .setCredentialsProvider(credentialsProvider) .setTimeout((int) TimeUnit.MINUTES.toSeconds(5)) .call();
public Void call(Git git, GitContext context) throws Exception { removeVersionFromCaches(versionId); GitHelpers.removeBranch(git, versionId); git.push().setTimeout(gitTimeout) .setCredentialsProvider(getCredentialsProvider()) .setRefSpecs(new RefSpec().setSource(null).setDestination("refs/heads/" + versionId)) .call(); return null; } };
public Void call(Git git, GitContext context) throws Exception { removeVersionFromCaches(versionId); GitHelpers.removeBranch(git, versionId); git.push().setTimeout(gitTimeout) .setCredentialsProvider(getCredentialsProvider()) .setRefSpecs(new RefSpec().setSource(null).setDestination("refs/heads/" + versionId)) .call(); return null; } };
Exception lastException = null; try { resit = git.push().setTimeout(gitTimeout).setCredentialsProvider(credentialsProvider).setPushAll().call().iterator(); } catch (GitAPIException | JGitInternalException ex) { lastException = ex;
.setTimeout(pullPushTimeoutSeconds) .call();
.setTimeout(pullPushTimeoutSeconds) .call();
resit = git.push().setTimeout(gitTimeout).setCredentialsProvider(credentialsProvider) .setPushTags() .setPushAll()
@Override protected void run() throws Exception { Git git = new Git(db); PushCommand push = git.push(); push.setDryRun(dryRun); push.setForce(force); push.setProgressMonitor(new TextProgressMonitor()); push.setReceivePack(receivePack); push.setRefSpecs(refSpecs); if (all) push.setPushAll(); if (tags) push.setPushTags(); push.setRemote(remote); push.setThin(thin); push.setTimeout(timeout); Iterable<PushResult> results = push.call(); for (PushResult result : results) { ObjectReader reader = db.newObjectReader(); try { printPushResult(reader, result.getURI(), result); } finally { reader.release(); } } }