Examples of commit()


Examples of org.eclipse.egit.ui.internal.commit.CommitUI.commit()

  protected void buttonPressed(int buttonId) {
    switch (buttonId) {
    case IDialogConstants.PROCEED_ID:
      CommitUI commitUI = new CommitUI(getShell(), repository,
          new IResource[0], true);
      shouldContinue = commitUI.commit();
      break;
    case IDialogConstants.ABORT_ID:
      final ResetOperation operation = new ResetOperation(repository,
          Constants.HEAD, ResetType.HARD);
      String jobname = NLS.bind(UIText.ResetAction_reset, Constants.HEAD);

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

                for (IRepositoryContentProvider provider : generatingProviders) {
                    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();

Examples of org.eclipse.jgit.dircache.DirCache.commit()

    final DirCache cache = db.readDirCache();
    if (!cache.lock())
      throw die(CLIText.get().failedToLockIndex);
    cache.read();
    cache.write();
    if (!cache.commit())
      throw die(CLIText.get().failedToCommitIndex);
  }
}

Examples of org.eclipse.jgit.dircache.DirCacheBuilder.commit()

      dc = repo.lockDirCache();
      dc.clear();
      DirCacheBuilder dcb = dc.builder();
      dcb.addTree(new byte[0], 0, repo.newObjectReader(),
          commit.getTree());
      dcb.commit();
    } catch (IOException e) {
      throw e;
    } finally {
      if (dc != null)
        dc.unlock();

Examples of org.eclipse.jgit.dircache.DirCacheEditor.commit()

            }
          });
        }
      }

      edit.commit();
    } catch (IOException e) {
      throw new RuntimeException(e);
    } finally {
      if (dc != null)
        dc.unlock();

Examples of org.eclipse.jgit.internal.storage.file.LockFile.commit()

      final LockFile lf;
      lf = new LockFile(new File(db.getDirectory(), Constants.HEAD), db.getFS());
      if (!lf.lock())
        throw new IOException(MessageFormat.format(CLIText.get().cannotLock, Constants.HEAD));
      lf.write(id);
      if (!lf.commit())
        throw new IOException(CLIText.get().cannotDeatchHEAD);
    }
  }

  private void deleteAllRefs() throws Exception {

Examples of org.eclipse.jgit.junit.TestRepository.commit()

  }

  @Test
  public void testPushNotSupported() throws Exception {
    final TestRepository src = createTestRepository();
    final RevCommit Q = src.commit().create();
    final Repository db = src.getRepository();

    Transport t = Transport.open(db, remoteURI);
    ((TransportHttp) t).setUseSmartHttp(false);
    try {

Examples of org.eclipse.jgit.junit.TestRepository.BranchBuilder.commit()

  @Test
  public void testRecursiveMergeWithConflict() throws Exception {
    TestRepository<Repository> db_t = new TestRepository<Repository>(db);
    BranchBuilder master = db_t.branch("master");
    RevCommit m0 = master.commit().add("f", "1\n2\n3\n4\n5\n6\n7\n8\n9\n")
        .message("m0").create();
    RevCommit m1 = master.commit()
        .add("f", "1-master\n2\n3\n4\n5\n6\n7\n8\n9\n").message("m1")
        .create();
    db_t.getRevWalk().parseCommit(m1);

Examples of org.eclipse.jgit.lib.Commit.commit()

    c.setAuthor(new PersonIdent(author, 1154236443000L, -4 * 60));
    c.setCommitter(new PersonIdent(committer, 1154236443000L, -4 * 60));
    c.setMessage("A Commit\n");
    c.setTree(t);
    assertEquals(t.getTreeId(), c.getTreeId());
    c.commit();
    final ObjectId cmtid = ObjectId.fromString(
        "803aec4aba175e8ab1d666873c984c0308179099");
    assertEquals(cmtid, c.getCommitId());

    // Verify the commit we just wrote is in the correct format.

Examples of org.eclipse.jgit.storage.file.LockFile.commit()

            result.add(h);
          }
        } finally {
          w.close();
        }
        lock.commit();
      }
    } finally {
      lock.unlock();
    }
  }
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.