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 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 status = "401 Unauthorized";
        final String exp = remoteURI.toString() + ": " + status;
        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

            Transport transport = Transport.open(localDb, uri);
            transport.setDryRun(dryRun);
            transport.setTimeout(timeout);
            if (credentialsProvider != null)
              transport.setCredentialsProvider(credentialsProvider);
            PushResult result = transport.push(gitSubMonitor, refUpdates, out);

            operationResult.addOperationResult(result.getURI(), result);
            specification.addURIRefUpdates(result.getURI(), result.getRemoteUpdates());
          } catch (JGitInternalException e) {
            String errorMessage = e.getCause() != null ? e
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.