Package org.eclipse.jgit.junit

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 {
View Full Code Here


  @Test
  public void testPush_CreateBranch() throws Exception {
    final TestRepository src = createTestRepository();
    final RevBlob Q_txt = src.blob("new text");
    final RevCommit Q = src.commit().add("Q", Q_txt).create();
    final Repository db = src.getRepository();
    final String dstName = Constants.R_HEADS + "new.branch";
    Transport t;
    PushResult result;
View Full Code Here

  @Test
  public void testPush_HookMessagesToOutputStream() throws Exception {
    final TestRepository src = createTestRepository();
    final RevBlob Q_txt = src.blob("new text");
    final RevCommit Q = src.commit().add("Q", Q_txt).create();
    final Repository db = src.getRepository();
    final String dstName = Constants.R_HEADS + "new.branch";
    Transport t;
    PushResult result;
View Full Code Here

  @Test
  public void testPush_CreateBranch() throws Exception {
    final TestRepository src = createTestRepository();
    final RevBlob Q_txt = src.blob("new text");
    final RevCommit Q = src.commit().add("Q", Q_txt).create();
    final Repository db = src.getRepository();
    final String dstName = Constants.R_HEADS + "new.branch";
    final Transport t = Transport.open(db, remoteURI);
    try {
      final String srcExpr = Q.name();
View Full Code Here

  @Test
  public void testPush_NotAuthorized() throws Exception {
    final TestRepository src = createTestRepository();
    final RevBlob Q_txt = src.blob("new text");
    final RevCommit Q = src.commit().add("Q", Q_txt).create();
    final Repository db = src.getRepository();
    final String dstName = Constants.R_HEADS + "new.branch";
    Transport t;

    // push anonymous shouldn't be allowed.
View Full Code Here

  @Test
  public void testPush_CreateBranch() throws Exception {
    final TestRepository src = createTestRepository();
    final RevBlob Q_txt = src.blob("new text");
    final RevCommit Q = src.commit().add("Q", Q_txt).create();
    final Repository db = src.getRepository();
    final String dstName = Constants.R_HEADS + "new.branch";
    Transport t;

    enableReceivePack();
View Full Code Here

  }

  @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);
    try {
      try {
View Full Code Here

  @Test
  public void testPush_packSize() throws Exception {
    final TestRepository src = createTestRepository();
    final RevBlob Q_txt = src
        .blob("some blob content to measure pack size");
    final RevCommit Q = src.commit().add("Q", Q_txt).create();
    final Repository db = src.getRepository();
    final String dstName = Constants.R_HEADS + "new.branch";
    Transport t;
    PushResult result;
View Full Code Here

    // Fill dst with a some common history.
    //
    TestRepository d = new TestRepository(dst);
    a = d.blob("a");
    A = d.commit(d.tree(d.file("a", a)));
    B = d.commit().parent(A).create();
    d.update(R_MASTER, B);

    // Clone from dst into src
    //
View Full Code Here

    // Fill dst with a some common history.
    //
    TestRepository d = new TestRepository(dst);
    a = d.blob("a");
    A = d.commit(d.tree(d.file("a", a)));
    B = d.commit().parent(A).create();
    d.update(R_MASTER, B);

    // Clone from dst into src
    //
    Transport t = Transport.open(src, uriOf(dst));
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.