@Override public PushCommand push() { return configure(super.push()).setProgressMonitor(progressMonitor("push")); }
@Override public PushCommand push() { return configure(super.push()).setProgressMonitor(progressMonitor("push")); }
@Override public PushCommand push() { return configure(super.push()).setProgressMonitor(progressMonitor("push")); }
PushCommand pushCommand = git.push().setRemote(remoteName).setPushTags().setProgressMonitor(new TextProgressMonitor()); results = git.push().setRemote(remoteName).setRefSpecs(branchesToDelete).setProgressMonitor(new TextProgressMonitor()).call();
.setProgressMonitor(new TextProgressMonitor()); .setProgressMonitor(new TextProgressMonitor()).call();
git .push() .setProgressMonitor(NullProgressMonitor.INSTANCE) .setCredentialsProvider(credentialsProvider) .setTimeout((int) TimeUnit.MINUTES.toSeconds(5))
final Iterable<PushResult> pushResults = git.push().setProgressMonitor(PROGRESS_MONITOR).setCredentialsProvider(user) .setTimeout(pullPushTimeoutSeconds) .call();
final Iterable<PushResult> pushResults = git.push().setProgressMonitor(PROGRESS_MONITOR).setCredentialsProvider(user) .setTimeout(pullPushTimeoutSeconds) .call();
cmd.setProgressMonitor(new TextProgressMonitor());
@Override public void execute() throws GitException, InterruptedException { try (Repository repo = getRepository()) { RefSpec ref = (refspec != null) ? new RefSpec(fixRefSpec(repo)) : Transport.REFSPEC_PUSH_ALL; listener.getLogger().println("RefSpec is \""+ref+"\"."); Git g = git(repo); Config config = g.getRepository().getConfig(); config.setString("remote", "org_jenkinsci_plugins_gitclient_JGitAPIImpl", "url", remote.toPrivateASCIIString()); org.eclipse.jgit.api.PushCommand pc = g.push().setRemote("org_jenkinsci_plugins_gitclient_JGitAPIImpl").setRefSpecs(ref) .setProgressMonitor(new JGitProgressMonitor(listener)) .setCredentialsProvider(getProvider()) .setForce(force); if(tags) { pc.setPushTags(); } Iterable<PushResult> results = pc.call(); for(PushResult result:results) for(RemoteRefUpdate update:result.getRemoteUpdates()) { RemoteRefUpdate.Status status = update.getStatus(); if(!OK.equals(status)&&!UP_TO_DATE.equals(status)) { throw new GitException(update.getMessage() + " " + status + " for '" + ref + "' refspec '" + refspec + "' to " + remote.toPrivateASCIIString()); } } config.unset("remote", "org_jenkinsci_plugins_gitclient_JGitAPIImpl", "url"); } catch (IOException | JGitInternalException | GitAPIException e) { throw new GitException(e); } }
.setProgressMonitor(new BasicProgressMonitor()) .setTransportConfigCallback(new SgitTransportCallback()) .setRemote(mRemote);
@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(); } } }
.setProgressMonitor(new BasicProgressMonitor()) .setTransportConfigCallback(new SgitTransportCallback()) .setRemote(mRemote);