Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.PullCommand


        for (int i = 0; i < repositories.length; i++) {
          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);
            pullResult = pull.call();
            results.put(repository, pullResult);
          } catch (DetachedHeadException e) {
            results.put(repository, Activator.error(
                CoreText.PullOperation_DetachedHeadMessage, e));
          } catch (InvalidConfigurationException e) {
View Full Code Here


   }

   public static PullResult pull(final Git git, final int timeout) throws WrongRepositoryStateException,
            InvalidConfigurationException, DetachedHeadException, InvalidRemoteException, CanceledException
   {
      PullCommand pull = git.pull();
      if (timeout >= 0)
         pull.setTimeout(timeout);
      pull.setProgressMonitor(new TextProgressMonitor());

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

TOP

Related Classes of org.eclipse.jgit.api.PullCommand

Copyright © 2018 www.massapicom. 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.