Package org.eclipse.jgit.transport

Examples of org.eclipse.jgit.transport.PostReceiveHook


    gs.setReceivePackFactory(new DefaultReceivePackFactory() {
      public ReceivePack create(HttpServletRequest req, Repository db)
          throws ServiceNotEnabledException,
          ServiceNotAuthorizedException {
        ReceivePack recv = super.create(req, db);
        recv.setPostReceiveHook(new PostReceiveHook() {

          public void onPostReceive(ReceivePack rp,
              Collection<ReceiveCommand> commands) {
            packSize = rp.getPackSize();
          }
View Full Code Here


                    repository = GitRepository.buildGitRepository(project);
                    uploadPack(requestStream, repository, new PipedOutputStream(responseStream));
                    break;
                case "git-receive-pack":
                    repository = GitRepository.buildGitRepository(project, false);
                    PostReceiveHook postReceiveHook = createPostReceiveHook(UserApp.currentUser(), project, request);
                    receivePack(requestStream, repository, new PipedOutputStream(responseStream),
                            postReceiveHook);
                    // receivePack.setEchoCommandFailures(true);
                    break;
                default:
View Full Code Here

                                oldTreeRefs.put( command.getRefName(), lastCommit );
                            }
                        }
                    } );

                    setPostReceiveHook( new PostReceiveHook() {
                        @Override
                        public void onPostReceive( final ReceivePack rp,
                                                   final Collection<ReceiveCommand> commands ) {
                            for ( Map.Entry<String, RevCommit> oldTreeRef : oldTreeRefs.entrySet() ) {
                                final List<RevCommit> commits = JGitUtil.getCommits( fs, oldTreeRef.getKey(), oldTreeRef.getValue(), JGitUtil.getLastCommit( fs.gitRepo(), oldTreeRef.getKey() ) );
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.transport.PostReceiveHook

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.