Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.PushCommand.call()


    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 {
View Full Code Here


    };
    SshSessionFactory.setInstance(sessionFactory);

    PushCommand pushCommand = repo.push().setRemote(remoteUrl).add("master").setProgressMonitor(new TextProgressMonitor()).setForce(true);
       
    pushCommand.call();
  }
}
View Full Code Here

    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 {
View Full Code Here

      RefSpec spec = new RefSpec(srcRef + ':' + (pushToGerrit ? "refs/" : Constants.R_HEADS) + branch);
      pushCommand.setRemote(remote).setRefSpecs(spec);
      if (tags)
        pushCommand.setPushTags();
      pushCommand.setForce(force);
      Iterable<PushResult> resultIterable = pushCommand.call();
      if (monitor.isCanceled()) {
        return new Status(IStatus.CANCEL, GitActivator.PI_GIT, "Cancelled");
      }
      PushResult pushResult = resultIterable.iterator().next();
      boolean error = false;
View Full Code Here

     */
    public void push(CredentialsProvider credentialsProvider) {
        PushCommand push = git.push();
        push.setCredentialsProvider(credentialsProvider);
        try {
            push.call();
        } catch (JGitInternalException e) {
            throw new IllegalStateException("Unable to push into remote Git repository", e);
        } catch (InvalidRemoteException e) {
            throw new IllegalStateException("Unable to push into remote Git repository", e);
        } catch (TransportException e) {
View Full Code Here

    };
    SshSessionFactory.setInstance(sessionFactory);

    PushCommand pushCommand = repo.push().setRemote(remoteUrl).add("master").setProgressMonitor(new TextProgressMonitor()).setForce(true);
       
    pushCommand.call();

    // repo.push().setRemote("")
  }
}
View Full Code Here

      PushCommand pushCommand = git.push();
      pushCommand.setRemote(remoteLocation);
      pushCommand.setRefSpecs(new RefSpec(repository.getFullBranch()));

      Iterable<PushResult> pushResult = pushCommand.call();
      Iterator<PushResult> result = pushResult.iterator();

      StringBuffer buffer = new StringBuffer();
      if (result.hasNext()) {
        while (result.hasNext()) {
View Full Code Here

     */
    public void push(CredentialsProvider credentialsProvider) {
        PushCommand push = git.push();
        push.setCredentialsProvider(credentialsProvider);
        try {
            push.call();
        } catch (JGitInternalException e) {
            throw new IllegalStateException("Unable to push into remote Git repository", e);
        } catch (InvalidRemoteException e) {
            throw new IllegalStateException("Unable to push into remote Git repository", e);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.