try { final ReceivePack rp = receivePackFactory.create(req, remote); rp.receive(out_r, in_w, System.err); } catch (ServiceNotEnabledException e) {
@Override protected void execute(final DaemonClient dc, final Repository db, @Nullable Collection<String> extraParameters) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = receivePackFactory.create(dc, db); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); rp.receive(in, out, null); } } };
@Override protected void execute( final DaemonClient dc, final Repository db ) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = receivePackFactory.create( dc, db ); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); rp.receive( in, out, null ); } } };
@Override protected void execute(final DaemonClient dc, final Repository db) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = receivePackFactory.create(dc, db); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); rp.receive(in, out, null); } } };
@Override protected void execute(final DaemonClient dc, final Repository db) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { final ReceivePack rp = receivePackFactory.create(dc, db); final InputStream in = dc.getInputStream(); final OutputStream out = dc.getOutputStream(); rp.receive(in, out, null); } }};
try { final ReceivePack rp = receivePackFactory.create(req, remote); rp.receive(out_r, in_w, System.err); } catch (ServiceNotEnabledException e) {
@Override protected void run() throws Exception { final org.eclipse.jgit.transport.ReceivePack rp; try { FileKey key = FileKey.lenient(dstGitdir, FS.DETECTED); db = key.open(true /* must exist */); } catch (RepositoryNotFoundException notFound) { throw die(MessageFormat.format(CLIText.get().notAGitRepository, dstGitdir.getPath())); } rp = new org.eclipse.jgit.transport.ReceivePack(db); rp.receive(ins, outs, errs); } }
public void run() { try { final ReceivePack rp = receivePackFactory.create(req, remote); rp.receive(out_r, in_w, System.err); } 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. } catch (RuntimeException err) { // Clients side will notice we went away, and report. } 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 runImpl() throws IOException, Failure { final ReceivePack rp = new ReceivePack(repo); rp.setRefLogIdent(currentUser.newRefLogIdent()); rp.setTimeout(config.getTimeout()); try { rp.receive(in, out, err); } catch (InterruptedIOException err) { throw new Failure(128, "fatal: client IO read/write timeout", err); } catch (UnpackException badStream) { // This may have been triggered by branch level access controls. // Log what the heck is going on, as detailed as we can. // StringBuilder msg = new StringBuilder(); msg.append("Unpack error on project \"" + projectName() + "\":\n"); msg.append("\n"); IOException detail = new IOException(msg.toString(), badStream); throw new Failure(128, "fatal: Unpack error, check server log", detail); } }
@Override protected void runImpl() throws IOException, Failure { final ReceivePack rp = new ReceivePack(repo); rp.setRefLogIdent(currentUser.newRefLogIdent()); rp.setTimeout(config.getTimeout()); try { rp.receive(in, out, err); } catch (InterruptedIOException err) { throw new Failure(128, "fatal: client IO read/write timeout", err); } catch (UnpackException badStream) { // This may have been triggered by branch level access controls. // Log what the heck is going on, as detailed as we can. // StringBuilder msg = new StringBuilder(); msg.append("Unpack error on project \"" + projectName() + "\":\n"); msg.append("\n"); IOException detail = new IOException(msg.toString(), badStream); throw new Failure(128, "fatal: Unpack error, check server log", detail); } }
@Override protected void execute(final DaemonClient dc, final Repository db, @Nullable Collection<String> extraParameters) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = receivePackFactory.create(dc, db); InputStream in = dc.getInputStream(); OutputStream out = dc.getOutputStream(); rp.receive(in, out, null); } } };
@Override protected void execute(final FileSystemUser user, final Repository repository, final InputStream in, final OutputStream out, final OutputStream err, final JGitFileSystem fileSystem) { try { final ReceivePack rp = receivePackFactory.create(this, repository); rp.receive(in, out, err); rp.setPostReceiveHook((rp1, commands) -> { fileSystem.getGit().gc(); fileSystem.resetCommitCount(); }); } catch (final Exception ignored) { } } }
rsp.setContentType(RECEIVE_PACK_RESULT_TYPE); rp.receive(getInputStream(req), out, null); out.close(); } catch (UnpackException e) {
rsp.setContentType(RECEIVE_PACK_RESULT_TYPE); rp.receive(getInputStream(req), out, null); out.close(); } catch (CorruptObjectException e ) {