Package org.eclipse.jgit.transport

Examples of org.eclipse.jgit.transport.UploadPack.upload()


    UploadPack up = (UploadPack) req.getAttribute(ATTRIBUTE_HANDLER);
    try {
      up.setBiDirectionalPipe(false);
      rsp.setContentType(UPLOAD_PACK_RESULT_TYPE);

      up.upload(getInputStream(req), out, null);
      out.close();

    } catch (ServiceMayNotContinueException e) {
      if (e.isOutput()) {
        consumeRequestBody(req);
View Full Code Here


      SshKey key = getContext().getClient().getKey();
      if (key != null && !key.canClone()) {
        throw new Failure(1, "Sorry, your SSH public key is not allowed to clone!");
      }
      UploadPack up = uploadPackFactory.create(getContext().getClient(), repo);
      up.upload(in, out, null);
    } catch (Exception e) {
      throw new Failure(1, "fatal: Cannot upload pack: ", e);
    }
  }
}
View Full Code Here

              throws IOException, ServiceNotEnabledException,
              ServiceNotAuthorizedException {
            UploadPack up = uploadPackFactory.create(dc, db);
            InputStream in = dc.getInputStream();
            OutputStream out = dc.getOutputStream();
            up.upload(in, out, null);
          }
        }, new GitDaemonService("receive-pack", "receivepack") {
          {
            setEnabled(true);
            setOverridable(false);
View Full Code Here

      up.setAdvertiseRefsHook(new VisibleRefFilter(tagCache, repo,
          projectControl, db.get(), true));
    }
    up.setPackConfig(config.getPackConfig());
    up.setTimeout(config.getTimeout());
    up.upload(in, out, err);
  }
}
View Full Code Here

        @Override
        public void flush() throws IOException {
          doFlush();
        }
      };
      up.upload(getInputStream(req), out, null);
      out.close();

    } catch (ServiceNotAuthorizedException e) {
      rsp.reset();
      rsp.sendError(SC_UNAUTHORIZED);
View Full Code Here

        uploadPack.setBiDirectionalPipe(false);
        new Thread() {
            @Override
            public void run() {
                try {
                    uploadPack.upload(input, output, null);
                } catch (IOException e) {
                    Logger.error("uploadPack failed", e);
                }

                closeStreams("uploadPack", input, output);
View Full Code Here

    final UploadPack up = new UploadPack(repo);

    up.setPackConfig(config.getPackConfig());
    up.setTimeout(config.getTimeout());
    try {
      up.upload(in, out, err);
    } catch (InterruptedIOException err) {
      throw new Failure(128, "fatal: client IO read/write timeout", err);
    }
  }
}
View Full Code Here

                    ServiceNotEnabledException,
                    ServiceNotAuthorizedException {
                UploadPack up = uploadPackFactory.create( dc, db );
                InputStream in = dc.getInputStream();
                OutputStream out = dc.getOutputStream();
                up.upload( in, out, null );
            }
        } };
    }

    /**
 
View Full Code Here

        final PackConfig config = new PackConfig( repository );
        config.setCompressionLevel( Deflater.BEST_COMPRESSION );
        up.setPackConfig( config );

        try {
            up.upload( in, out, err );
        } catch ( IOException e ) {
        }
    }
}
View Full Code Here

    UploadPack up = (UploadPack) req.getAttribute(ATTRIBUTE_HANDLER);
    try {
      up.setBiDirectionalPipe(false);
      rsp.setContentType(UPLOAD_PACK_RESULT_TYPE);

      up.upload(getInputStream(req), out, null);
      out.close();

    } catch (ServiceMayNotContinueException e) {
      if (e.isOutput()) {
        consumeRequestBody(req);
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.