Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.TextProgressMonitor


class Gc extends TextBuiltin {
  @Override
  protected void run() throws Exception {
    GC gc = new GC((FileRepository) db);
    gc.setProgressMonitor(new TextProgressMonitor());
    gc.gc();
  }
View Full Code Here


      p.setAllowThin(fixThin);
      if (indexVersion != -1 && p instanceof ObjectDirectoryPackParser) {
        ObjectDirectoryPackParser imp = (ObjectDirectoryPackParser) p;
        imp.setIndexVersion(indexVersion);
      }
      p.parse(new TextProgressMonitor());
      inserter.flush();
    } finally {
      inserter.release();
    }
  }
View Full Code Here

        session.setUserInfo(userInfo);
      }
    };
    SshSessionFactory.setInstance(sessionFactory);

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

     */
    {
      PushCommand cmd = git.//
          push();

      cmd.setProgressMonitor(new TextProgressMonitor());

      Iterable<PushResult> pushResults = null;
      try {
        pushResults = cmd.setRefSpecs(new RefSpec("HEAD:refs/heads/master")).//
            setForce(true).//
View Full Code Here

      if (timeout >= 0)
         fetch.setTimeout(timeout);
      fetch.setDryRun(dryRun);
      fetch.setRemote(remote);
      fetch.setThin(thin);
      fetch.setProgressMonitor(new TextProgressMonitor());

      FetchResult result = fetch.call();
      return result;
   }
View Full Code Here

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

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

     * @return a ProgressMonitor for use
     */
    public static ProgressMonitor getMonitor( ScmLogger logger )
    {
        // X TODO write an own ProgressMonitor which logs to ScmLogger!
        return new TextProgressMonitor();
    }
View Full Code Here

                } catch (Exception e) {
                    workspaceProvider.cleanWorkingDirectory();
                    CloneCommand gitCommand = Git.cloneRepository()
                            .setURI(gitUrl)
                            .setDirectory(workingDir)
                            .setProgressMonitor(new TextProgressMonitor())
                            .setCredentialsProvider(user);
                    git = gitCommand.call();
                }
            } else {
                git = Git.cloneRepository()
                        .setURI(gitUrl)
                        .setDirectory(workingDir)
                        .setProgressMonitor(new TextProgressMonitor())
                        .setCredentialsProvider(user)
                        .call();
            }
        } catch (GitAPIException e) {
            LOGGER.error("Unable to clone git repository at " + gitUrl, e);
        }

        try {
            git.fetch()
                    .setProgressMonitor(new TextProgressMonitor())
                    .setCredentialsProvider(user)
                    .call();
        } catch (GitAPIException e) {
            LOGGER.error("Unable to fetch from " + gitUrl, e);
        }
View Full Code Here

      if (timeout >= 0)
         fetch.setTimeout(timeout);
      fetch.setDryRun(dryRun);
      fetch.setRemote(remote);
      fetch.setThin(thin);
      fetch.setProgressMonitor(new TextProgressMonitor());

      FetchResult result = fetch.call();
      return result;
   }
View Full Code Here

            RefNotFoundException, NoHeadException
   {
      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.lib.TextProgressMonitor

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.