@Override public void run() { try { final UploadPack rp = uploadPackFactory.create(req, remote); rp.upload(out_r, in_w, null); } catch (ServiceNotEnabledException e) { // Ignored. Client cannot use this repository. } catch (ServiceNotAuthorizedException e) { // Ignored. Client cannot use this repository. } catch (IOException err) { // Client side of the pipes should report the problem. err.printStackTrace(); } catch (RuntimeException err) { // Client side will notice we went away, and report. err.printStackTrace(); } finally { try { out_r.close(); } catch (IOException e2) { // Ignore close failure, we probably crashed above. } try { in_w.close(); } catch (IOException e2) { // Ignore close failure, we probably crashed above. } remote.close(); } } };
@Override protected void execute(final DaemonClient dc, final Repository db, @Nullable Collection<String> extraParameters) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { UploadPack up = uploadPackFactory.create(dc, db); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); if (extraParameters != null) { up.setExtraParameters(extraParameters); } up.upload(in, out, null); } }, new DaemonService("receive-pack", "receivepack") { //$NON-NLS-1$ //$NON-NLS-2$
@Override protected void execute(final DaemonClient dc, final Repository db) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { UploadPack up = uploadPackFactory.create(dc, db); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); up.upload(in, out, null); } }, new DaemonService("receive-pack", "receivepack") { //$NON-NLS-1$ //$NON-NLS-2$
@Override public void run() { try { final UploadPack rp = uploadPackFactory.create(req, remote); rp.upload(out_r, in_w, null); } catch (ServiceNotEnabledException e) { // Ignored. Client cannot use this repository. } catch (ServiceNotAuthorizedException e) { // Ignored. Client cannot use this repository. } catch (IOException err) { // Client side of the pipes should report the problem. err.printStackTrace(); } catch (RuntimeException err) { // Client side will notice we went away, and report. err.printStackTrace(); } finally { try { out_r.close(); } catch (IOException e2) { // Ignore close failure, we probably crashed above. } try { in_w.close(); } catch (IOException e2) { // Ignore close failure, we probably crashed above. } remote.close(); } } };
@Override protected void execute( final DaemonClient dc, final Repository db ) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { UploadPack up = uploadPackFactory.create( dc, db ); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); up.upload( in, out, null ); } }, new DaemonService( "receive-pack", "receivepack" ) {
public void run() { try { final UploadPack rp = uploadPackFactory.create(req, remote); rp.upload(out_r, in_w, null); } catch (ServiceNotEnabledException e) { // Ignored. Client cannot use this repository. } catch (ServiceNotAuthorizedException e) { // Ignored. Client cannot use this repository. } catch (IOException err) { // Client side of the pipes should report the problem. err.printStackTrace(); } catch (RuntimeException err) { // Client side will notice we went away, and report. err.printStackTrace(); } finally { try { out_r.close(); } catch (IOException e2) { // Ignore close failure, we probably crashed above. } try { in_w.close(); } catch (IOException e2) { // Ignore close failure, we probably crashed above. } remote.close(); } } };
@Override protected void execute(final DaemonClient dc, final Repository db) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { final UploadPack up = uploadPackFactory.create(dc, db); final InputStream in = dc.getInputStream(); final OutputStream out = dc.getOutputStream(); up.upload(in, out, null); } }, new DaemonService("receive-pack",
@Override protected void run() throws Exception { final org.eclipse.jgit.transport.UploadPack up; try { FileKey key = FileKey.lenient(srcGitdir, FS.DETECTED); db = key.open(true /* must exist */); } catch (RepositoryNotFoundException notFound) { throw die(MessageFormat.format(CLIText.get().notAGitRepository, srcGitdir.getPath())); } up = new org.eclipse.jgit.transport.UploadPack(db); if (0 <= timeout) up.setTimeout(timeout); up.upload(ins, outs, errs); } }
@Override protected void execute(final DaemonClient dc, final Repository db, @Nullable Collection<String> extraParameters) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { UploadPack up = uploadPackFactory.create(dc, db); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); if (extraParameters != null) { up.setExtraParameters(extraParameters); } up.upload(in, out, null); } }, new DaemonService("receive-pack", "receivepack") { //$NON-NLS-1$ //$NON-NLS-2$
@Override protected void runImpl() throws IOException, Failure { 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); } } }
@Override protected void runImpl() throws IOException, Failure { 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); } } }
rsp.setContentType(UPLOAD_PACK_RESULT_TYPE); up.upload(getInputStream(req), out, null); out.close();
@Override protected void execute(final FileSystemUser user, final Repository repository, final InputStream in, final OutputStream out, final OutputStream err, final JGitFileSystem fileSystem) { final UploadPack up = new UploadPack(repository); final PackConfig config = new PackConfig(repository); config.setCompressionLevel(Deflater.BEST_COMPRESSION); up.setPackConfig(config); up.setRefFilter(new HiddenBranchRefFilter()); try { up.upload(in, out, err); } catch (final IOException ignored) { } } }
rsp.setContentType(UPLOAD_PACK_RESULT_TYPE); up.upload(getInputStream(req), out, null); out.close();