Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.Git.push()


                    if (!provider.supportsGeneration())
                        continue;
                    git.add().addFilepattern(getRelativePath(gitRootDir, newFile)).addFilepattern(getRelativePath(gitRootDir, new File(provider.getDefaultIndexName(pretty)))).call();
                }
                git.commit().setMessage("bndtools added bundle : " + getRelativePath(gitRootDir, newFile)).call();
                git.push().setCredentialsProvider(CredentialsProvider.getDefault()).call();

                // Re-read the index
                reset();
                init();
            }
View Full Code Here


                .setDirectory(dir)
                .call();

        Git git = Git.open(dir);
        git.commit().setMessage("First Commit").setCommitter("sshd", "sshd@apache.org").call();
        git.push().call();

        new File("target/git/local/test.git/readme.txt").createNewFile();
        git.add().addFilepattern("readme.txt").call();
        git.commit().setMessage("readme").setCommitter("sshd", "sshd@apache.org").call();
        git.push().call();
View Full Code Here

        git.push().call();

        new File("target/git/local/test.git/readme.txt").createNewFile();
        git.add().addFilepattern("readme.txt").call();
        git.commit().setMessage("readme").setCommitter("sshd", "sshd@apache.org").call();
        git.push().call();

        git.pull().setRebase(true).call();

        sshd.stop();
    }
View Full Code Here

        git.commit()
                .setAll(true)
                .setMessage("changed")
                .setCommitter("admin", "admin@example.com")
                .call();
        git.push()
                .setRemote("origin")
                .setCredentialsProvider(new UsernamePasswordCredentialsProvider("admin", "admin"))
                .call();
        SpeakeasyUserPage page = product.visit(SpeakeasyUserPage.class);
        assertEquals("Git changed test", page.getPlugins().get("git").getName());
View Full Code Here

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

      if (! silentUpload)
        cmd.setProgressMonitor(new TextProgressMonitor());

View Full Code Here

  private boolean shownURI;

  @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);
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

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

      cmd.setProgressMonitor(new TextProgressMonitor());

      Iterable<PushResult> pushResults = null;
View Full Code Here

    BufferedWriter w = new BufferedWriter(os);
    w.write("// hellol中文 " + new Date().toString() + "\n");
    w.close();
    git.add().addFilepattern(file.getName()).call();
    git.commit().setMessage("test commit").call();
    Iterable<PushResult> results = git.push().setPushAll().call();
    GitBlitSuite.close(git);
    for (PushResult result : results) {
      for (RemoteRefUpdate update : result.getRemoteUpdates()) {
        assertEquals(Status.OK, update.getStatus());
      }
View Full Code Here

    BufferedWriter w = new BufferedWriter(os);
    w.write("// " + new Date().toString() + "\n");
    w.close();
    git.add().addFilepattern(file.getName()).call();
    git.commit().setMessage("test commit").call();
    Iterable<PushResult> results = git.push().setPushAll().setCredentialsProvider(new UsernamePasswordCredentialsProvider(account, password)).call();
    GitBlitSuite.close(git);
    for (PushResult result : results) {
      for (RemoteRefUpdate update : result.getRemoteUpdates()) {
        assertEquals(Status.OK, update.getStatus());
      }
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.