Package org.eclipse.jgit.transport

Examples of org.eclipse.jgit.transport.Transport.push()


    Transport t = Transport.open(db, remoteURI);
    ((TransportHttp) t).setUseSmartHttp(false);
    try {
      try {
        t.push(NullProgressMonitor.INSTANCE, push(src, Q));
        fail("push incorrectly completed against a smart server");
      } catch (NotSupportedException nse) {
        String exp = "smart HTTP push disabled";
        assertEquals(exp, nse.getMessage());
      }
View Full Code Here


      final String localName = null;
      final ObjectId oldId = null;

      RemoteRefUpdate update = new RemoteRefUpdate(src.getRepository(),
          srcExpr, dstName, forceUpdate, localName, oldId);
      result = t.push(NullProgressMonitor.INSTANCE, Collections
          .singleton(update));
    } finally {
      t.close();
    }
View Full Code Here

      final String localName = null;
      final ObjectId oldId = null;

      RemoteRefUpdate update = new RemoteRefUpdate(src.getRepository(),
          srcExpr, dstName, forceUpdate, localName, oldId);
      result = t.push(NullProgressMonitor.INSTANCE,
          Collections.singleton(update), out);
    } finally {
      t.close();
    }
View Full Code Here

      final ObjectId oldId = null;

      RemoteRefUpdate update = new RemoteRefUpdate(src.getRepository(),
          srcExpr, dstName, forceUpdate, localName, oldId);
      try {
        t.push(NullProgressMonitor.INSTANCE, Collections
            .singleton(update));
        fail("push completed without throwing exception");
      } catch (RemoteRepositoryException error) {
        assertEquals(remoteURI + ": message line 1\n" //
            + "no soup for you!\n" //
View Full Code Here

      final String localName = null;
      final ObjectId oldId = null;

      RemoteRefUpdate update = new RemoteRefUpdate(src.getRepository(),
          srcExpr, dstName, forceUpdate, localName, oldId);
      result = t.push(NullProgressMonitor.INSTANCE,
          Collections.singleton(update));
    } finally {
      t.close();
    }
    assertEquals("expected 1 RemoteUpdate", 1, result.getRemoteUpdates()
View Full Code Here

      final ObjectId oldId = null;

      RemoteRefUpdate u = new RemoteRefUpdate(src.getRepository(),
          srcExpr, dstName, forceUpdate, localName, oldId);
      try {
        t.push(NullProgressMonitor.INSTANCE, Collections.singleton(u));
        fail("anonymous push incorrectly accepted without error");
      } catch (TransportException e) {
        final String exp = remoteURI + ": "
            + JGitText.get().authenticationNotSupported;
        assertEquals(exp, e.getMessage());
View Full Code Here

      final String localName = null;
      final ObjectId oldId = null;

      RemoteRefUpdate u = new RemoteRefUpdate(src.getRepository(),
          srcExpr, dstName, forceUpdate, localName, oldId);
      t.push(NullProgressMonitor.INSTANCE, Collections.singleton(u));
    } finally {
      t.close();
    }

    assertTrue(remoteRepository.hasObject(Q_txt));
View Full Code Here

      final String localName = null;
      final ObjectId oldId = null;

      RemoteRefUpdate u = new RemoteRefUpdate(src.getRepository(),
          srcExpr, dstName, forceUpdate, localName, oldId);
      t.push(NullProgressMonitor.INSTANCE, Collections.singleton(u));
    } finally {
      t.close();
    }

    assertTrue(remoteRepository.hasObject(Q_bin));
View Full Code Here

    final Repository db = src.getRepository();

    Transport t = Transport.open(db, remoteURI);
    try {
      try {
        t.push(NullProgressMonitor.INSTANCE, push(src, Q));
        fail("push incorrectly completed against a dumb server");
      } catch (NotSupportedException nse) {
        String exp = "remote does not support smart HTTP push";
        assertEquals(exp, nse.getMessage());
      }
View Full Code Here

      final ObjectId oldId = null;

      RemoteRefUpdate update = new RemoteRefUpdate(src.getRepository(),
          srcExpr, dstName, forceUpdate, localName, oldId);
      try {
        t.push(NullProgressMonitor.INSTANCE, Collections
            .singleton(update));
        fail("push completed without throwing exception");
      } catch (RemoteRepositoryException error) {
        assertEquals(remoteURI + ": message line 1\n" //
            + "no soup for you!\n" //
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.