Examples of PullResult


Examples of org.eclipse.jgit.api.PullResult

      PullCommand pull = git.pull();
      if (timeout >= 0)
         pull.setTimeout(timeout);
      pull.setProgressMonitor(new TextProgressMonitor());

      PullResult result = pull.call();
      return result;
   }
View Full Code Here

Examples of org.eclipse.jgit.api.PullResult

      PullCommand pull = git.pull();
      if (timeout >= 0)
         pull.setTimeout(timeout);
      pull.setProgressMonitor(new TextProgressMonitor());

      PullResult result = pull.call();
      return result;
   }
View Full Code Here

Examples of org.eclipse.jgit.api.PullResult

      PullCommand pull = git.pull();
      if (timeout >= 0)
         pull.setTimeout(timeout);
      pull.setProgressMonitor(new TextProgressMonitor());

      PullResult result = pull.call();
      return result;
   }
View Full Code Here

Examples of org.eclipse.jgit.api.PullResult

                repository.resolve("refs/heads/master"));

        // TODO: why do we get null here for HEAD?!? See also
// http://stackoverflow.com/questions/17979660/jgit-pull-noheadexception

        PullResult call = new Git(repository).pull().call();

        System.out.println("Pulled from the remote repository: " + call);

        repository.close();
    }
View Full Code Here

Examples of org.eclipse.jgit.api.PullResult

          Repository repository = repositories[i];
          if (mymonitor.isCanceled())
            throw new CoreException(Status.CANCEL_STATUS);
          IProject[] validProjects = ProjectUtil.getValidOpenProjects(repository);
          PullCommand pull = new Git(repository).pull();
          PullResult pullResult = null;
          try {
            pull.setProgressMonitor(new EclipseGitProgressTransformer(
                new SubProgressMonitor(mymonitor, 1)));
            pull.setTimeout(timeout);
            pull.setCredentialsProvider(credentialsProvider);
View Full Code Here

Examples of org.eclipse.jgit.api.PullResult

      Object resultOrError = item.getValue();
      if (resultOrError instanceof IStatus)
        return PlatformUI.getWorkbench().getSharedImages().getImage(
            ISharedImages.IMG_ELCL_STOP);

      PullResult res = (PullResult) item.getValue();
      boolean success = res.isSuccessful();
      if (!success)
        return PlatformUI.getWorkbench().getSharedImages().getImage(
            ISharedImages.IMG_ELCL_STOP);
      return null;
    }
View Full Code Here

Examples of org.eclipse.jgit.api.PullResult

      case 0:
        return utils.getRepositoryName(item.getKey());
      case 1: {
        if (item.getValue() instanceof IStatus)
          return UIText.MultiPullResultDialog_UnknownStatus;
        PullResult pullRes = (PullResult) item.getValue();
        if (pullRes.getFetchResult() == null)
          return UIText.MultiPullResultDialog_NothingFetchedStatus;
        else if (pullRes.getFetchResult().getTrackingRefUpdates()
            .isEmpty())
          return UIText.MultiPullResultDialog_NothingUpdatedStatus;
        else {
          int updated = pullRes.getFetchResult()
              .getTrackingRefUpdates().size();
          if ( updated == 1)
            return UIText.MultiPullResultDialog_UpdatedOneMessage;
          return NLS.bind(
              UIText.MultiPullResultDialog_UpdatedMessage,
              Integer.valueOf(updated));
        }
      }
      case 2: {
        if (item.getValue() instanceof IStatus)
          return UIText.MultiPullResultDialog_UnknownStatus;
        PullResult pullRes = (PullResult) item.getValue();
        if (pullRes.getMergeResult() != null) {
          return NLS.bind(
              UIText.MultiPullResultDialog_MergeResultMessage,
              MergeResultDialog.getStatusText(pullRes
                  .getMergeResult().getMergeStatus()));
        } else if (pullRes.getRebaseResult() != null) {
          RebaseResult res = pullRes.getRebaseResult();
          return NLS.bind(
              UIText.MultiPullResultDialog_RebaseResultMessage,
              RebaseResultDialog.getStatusText(res.getStatus()));
        } else {
          return UIText.MultiPullResultDialog_NothingUpdatedStatus;
        }
      }
      case 3:
        if (item.getValue() instanceof IStatus) {
          IStatus status = (IStatus) item.getValue();
          return status.getMessage();
        }
        PullResult res = (PullResult) item.getValue();
        if (res.isSuccessful())
          return UIText.MultiPullResultDialog_OkStatus;
        else
          return UIText.MultiPullResultDialog_FailedStatus;
      default:
        return null;
View Full Code Here

Examples of org.eclipse.jgit.api.PullResult

  private void handlePullResults(final Map<Repository, Object> resultsMap,
      Shell shell) {
    for (Entry<Repository, Object> entry : resultsMap.entrySet()) {
      Object result = entry.getValue();
      if (result instanceof PullResult) {
        PullResult pullResult = (PullResult) result;
        if (pullResult.getRebaseResult() != null
            && RebaseResult.Status.UNCOMMITTED_CHANGES == pullResult
                .getRebaseResult().getStatus()) {
          handleUncommittedChanges(entry.getKey(), pullResult
              .getRebaseResult().getUncommittedChanges(), shell);
        }
      }
    }
View Full Code Here

Examples of org.eclipse.jgit.api.PullResult

      PullCommand pull = git.pull();
      if (timeout >= 0)
         pull.setTimeout(timeout);
      pull.setProgressMonitor(new TextProgressMonitor());

      PullResult result = pull.call();
      return result;
   }
View Full Code Here

Examples of org.locationtech.geogig.api.porcelain.PullResult

                pull.addRefSpec(args.get(i));
            }
        }

        try {
            final PullResult result = pull.call();

            ConsoleReader console = cli.getConsole();
            TransferSummary fetchResult = result.getFetchResult();
            FetchResultPrinter.print(fetchResult, console);

            final Ref oldRef = result.getOldRef();
            final Ref newRef = result.getNewRef();

            if (oldRef == null && newRef == null) {
                console.println("Nothing to pull.");
            } else if (Objects.equal(oldRef, newRef)) {
                String name = oldRef == null ? newRef.getName() : oldRef.getName();
                name = Ref.localName(name);
                console.println(name + " already up to date.");
            } else {
                String oldTreeish;
                String newTreeish = newRef.getObjectId().toString();
                if (oldRef == null) {
                    console.println("From " + result.getRemoteName());
                    console.println(" * [new branch]     " + newRef.localName() + " -> "
                            + newRef.getName());

                    oldTreeish = ObjectId.NULL.toString();
                } else {
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.