Package org.eclipse.jgit.errors

Examples of org.eclipse.jgit.errors.TransportException


      TransportException {
    final InputStream src;
    try {
      src = new FileInputStream(bundle);
    } catch (FileNotFoundException err) {
      throw new TransportException(uri, JGitText.get().notFound);
    }
    return new BundleFetchConnection(this, src);
  }
View Full Code Here


    try {
      final Channel channel = sock.openChannel("sftp");
      channel.connect(tms);
      return (ChannelSftp) channel;
    } catch (JSchException je) {
      throw new TransportException(uri, je.getMessage(), je);
    }
  }
View Full Code Here

      try {
        for (final String n : s3.list(bucket, resolveKey(ROOT_DIR
            + "refs")))
          readRef(avail, "refs/" + n);
      } catch (IOException e) {
        throw new TransportException(getURI(), JGitText.get().cannotListRefs, e);
      }
    }
View Full Code Here

          br.close();
        }
      } catch (FileNotFoundException noRef) {
        return null;
      } catch (IOException err) {
        throw new TransportException(getURI(), MessageFormat.format(
            JGitText.get().transportExceptionReadRef, ref), err);
      }

      if (s == null)
        throw new TransportException(getURI(), MessageFormat.format(JGitText.get().transportExceptionEmptyRef, rn));

      if (s.startsWith("ref: ")) {
        final String target = s.substring("ref: ".length());
        Ref r = avail.get(target);
        if (r == null)
          r = readRef(avail, target);
        if (r == null)
          r = new ObjectIdRef.Unpeeled(Ref.Storage.NEW, target, null);
        r = new SymbolicRef(rn, r);
        avail.put(r.getName(), r);
        return r;
      }

      if (ObjectId.isId(s)) {
        final Ref r = new ObjectIdRef.Unpeeled(loose(avail.get(rn)),
            rn, ObjectId.fromString(s));
        avail.put(r.getName(), r);
        return r;
      }

      throw new TransportException(getURI(), MessageFormat.format(JGitText.get().transportExceptionBadRef, rn, s));
    }
View Full Code Here

    } catch (CancelledException ce) {
      close();
      return; // Caller should test (or just know) this themselves.
    } catch (IOException err) {
      close();
      throw new TransportException(err.getMessage(), err);
    } catch (RuntimeException err) {
      close();
      throw new TransportException(err.getMessage(), err);
    }
  }
View Full Code Here

      TransportException {
    if (toFetch == null || toFetch.isEmpty()) {
      // If the caller did not ask for anything use the defaults.
      //
      if (fetch.isEmpty())
        throw new TransportException(JGitText.get().nothingToFetch);
      toFetch = fetch;
    } else if (!fetch.isEmpty()) {
      // If the caller asked for something specific without giving
      // us the local tracking branch see if we can update any of
      // the local tracking branches without incurring additional
View Full Code Here

    if (toPush == null || toPush.isEmpty()) {
      // If the caller did not ask for anything use the defaults.
      try {
        toPush = findRemoteRefUpdatesFor(push);
      } catch (final IOException e) {
        throw new TransportException(MessageFormat.format(
            JGitText.get().problemWithResolvingPushRefSpecsLocally, e.getMessage()), e);
      }
      if (toPush.isEmpty())
        throw new TransportException(JGitText.get().nothingToPush);
    }
    final PushProcess pushProcess = new PushProcess(this, toPush);
    return pushProcess.execute(monitor);
  }
View Full Code Here

      switch (readSignature()) {
      case 2:
        readBundleV2();
        break;
      default:
        throw new TransportException(transport.uri, JGitText.get().notABundle);
      }
    } catch (TransportException err) {
      close();
      throw err;
    } catch (IOException err) {
      close();
      throw new TransportException(transport.uri, err.getMessage(), err);
    } catch (RuntimeException err) {
      close();
      throw new TransportException(transport.uri, err.getMessage(), err);
    }
  }
View Full Code Here

  private int readSignature() throws IOException {
    final String rev = readLine(new byte[1024]);
    if (TransportBundle.V2_BUNDLE_SIGNATURE.equals(rev))
      return 2;
    throw new TransportException(transport.uri, JGitText.get().notABundle);
  }
View Full Code Here

      } finally {
        ins.release();
      }
    } catch (IOException err) {
      close();
      throw new TransportException(transport.uri, err.getMessage(), err);
    } catch (RuntimeException err) {
      close();
      throw new TransportException(transport.uri, err.getMessage(), err);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.errors.TransportException

Copyright © 2018 www.massapicom. 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.