Package org.eclipse.jgit.errors

Examples of org.eclipse.jgit.errors.TransportException


          // complete copy of the messages (if any) buffered from
          // the other data channels.
          //
          int b = in.read();
          if (0 <= b)
            throw new TransportException(uri, MessageFormat.format(JGitText.get().expectedEOFReceived, (char) b));
        }
      }
    } catch (TransportException e) {
      throw e;
    } catch (Exception e) {
      throw new TransportException(uri, e.getMessage(), e);
    } finally {
      close();
    }
  }
View Full Code Here


      if (!rru.isDelete())
        writePack = true;
    }

    if (monitor.isCancelled())
      throw new TransportException(uri, JGitText.get().pushCancelled);
    pckOut.end();
    outNeedsEnd = false;
  }
View Full Code Here

    final String unpackLine = readStringLongTimeout();
    if (!unpackLine.startsWith("unpack "))
      throw new PackProtocolException(uri, MessageFormat.format(JGitText.get().unexpectedReportLine, unpackLine));
    final String unpackStatus = unpackLine.substring("unpack ".length());
    if (!unpackStatus.equals("ok"))
      throw new TransportException(uri, MessageFormat.format(
          JGitText.get().errorOccurredDuringUnpackingOnTheRemoteEnd, unpackStatus));

    String refLine;
    while ((refLine = pckIn.readString()) != PacketLineIn.END) {
      boolean ok = false;
View Full Code Here

      } catch (IOException err) {
        for (final RemoteRefUpdate u : packedRefUpdates) {
          u.setStatus(Status.REJECTED_OTHER_REASON);
          u.setMessage(err.getMessage());
        }
        throw new TransportException(uri, JGitText.get().failedUpdatingRefs, err);
      }
    }

    try {
      refWriter.writeInfoRefs();
    } catch (IOException err) {
      throw new TransportException(uri, JGitText.get().failedUpdatingRefs, err);
    }
  }
View Full Code Here

    } catch (IOException err) {
      safeDelete(pathIdx);
      safeDelete(pathPack);

      throw new TransportException(uri, JGitText.get().cannotStoreObjects, err);
    } finally {
      writer.release();
    }
  }
View Full Code Here

    try {
      final String ref = "ref: " + pickHEAD(updates) + "\n";
      final byte[] bytes = Constants.encode(ref);
      dest.writeFile(ROOT_DIR + Constants.HEAD, bytes);
    } catch (IOException e) {
      throw new TransportException(uri, JGitText.get().cannotCreateHEAD, e);
    }

    try {
      final String config = "[core]\n"
          + "\trepositoryformatversion = 0\n";
      final byte[] bytes = Constants.encode(config);
      dest.writeFile(ROOT_DIR + "config", bytes);
    } catch (IOException e) {
      throw new TransportException(uri, JGitText.get().cannotCreateConfig, e);
    }
  }
View Full Code Here

      env.remove("GIT_INDEX_FILE");
      env.remove("GIT_NO_REPLACE_OBJECTS");

      return proc.start();
    } catch (IOException err) {
      throw new TransportException(uri, err.getMessage(), err);
    }
  }
View Full Code Here

      final Repository dst;
      try {
        dst = new FileRepository(remoteGitDir);
      } catch (IOException err) {
        throw new TransportException(uri, JGitText.get().notAGitDirectory);
      }

      final PipedInputStream in_r;
      final PipedOutputStream in_w;

      final PipedInputStream out_r;
      final PipedOutputStream out_w;
      try {
        in_r = new PipedInputStream();
        in_w = new PipedOutputStream(in_r);

        out_r = new PipedInputStream() {
          // The client (BasePackFetchConnection) can write
          // a huge burst before it reads again. We need to
          // force the buffer to be big enough, otherwise it
          // will deadlock both threads.
          {
            buffer = new byte[MIN_CLIENT_BUFFER];
          }
        };
        out_w = new PipedOutputStream(out_r);
      } catch (IOException err) {
        dst.close();
        throw new TransportException(uri, JGitText.get().cannotConnectPipes, err);
      }

      worker = new Thread("JGit-Upload-Pack") {
        public void run() {
          try {
View Full Code Here

      final Repository dst;
      try {
        dst = new FileRepository(remoteGitDir);
      } catch (IOException err) {
        throw new TransportException(uri, JGitText.get().notAGitDirectory);
      }

      final PipedInputStream in_r;
      final PipedOutputStream in_w;

      final PipedInputStream out_r;
      final PipedOutputStream out_w;
      try {
        in_r = new PipedInputStream();
        in_w = new PipedOutputStream(in_r);

        out_r = new PipedInputStream();
        out_w = new PipedOutputStream(out_r);
      } catch (IOException err) {
        dst.close();
        throw new TransportException(uri, JGitText.get().cannotConnectPipes, err);
      }

      worker = new Thread("JGit-Receive-Pack") {
        public void run() {
          try {
View Full Code Here

        init(sIn, sOut);
        service("git-upload-pack", pckOut);
      } catch (IOException err) {
        close();
        throw new TransportException(uri,
            JGitText.get().remoteHungUpUnexpectedly, err);
      }
      readAdvertisedRefs();
    }
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.