示例#1
0
 public ActionResult ReceivePack(string project)
 {
     return ExecuteRpc(project, Rpc.ReceivePack, repository => {
         var pack = new ReceivePack(repository);
         pack.setBiDirectionalPipe(false);
         pack.receive(Request.InputStream, Response.OutputStream, Response.OutputStream);
     });
 }
示例#2
0
		public void Receive(Stream inputStream, Stream outputStream) {
			using (var repository = GetRepository()) {
				var pack = new ReceivePack(repository);
				pack.setPostReceiveHook(new PostReceiveFileHook(FullPath));
				pack.setBiDirectionalPipe(false);
				pack.receive(inputStream, outputStream, outputStream);
			}
		}
 public override void Receive(Stream inputStream, Stream outputStream)
 {
     using (var repository = GetRepository())
     {
         var pack = new ReceivePack(repository);
         pack.setBiDirectionalPipe(false);
         pack.receive(inputStream, outputStream, outputStream);
     }
 }
示例#4
0
        public void ReceivePack(string project)
        {
            Response.ContentType = "application/x-git-receive-pack-result";
            WriteNoCache();

            using (var repository = repositories.GetRepository(project)) {
                var pack = new ReceivePack(repository);
                pack.setBiDirectionalPipe(false);
                pack.receive(Request.InputStream, Response.OutputStream, Response.OutputStream);
            }
        }
        private ActionResult ExecuteReceivePack(string project)
        {
            Response.ContentType = "application/x-git-receive-pack-result";
            SetNoCache();

            var directory = GetDirectoryInfo(project);
            if (GitSharp.Repository.IsValid(directory.FullName, true))
            {
                using (var repository = new GitSharp.Repository(directory.FullName))
                using (var pack = new ReceivePack(repository))
                {
                    pack.setBiDirectionalPipe(false);
                    pack.receive(GetInputStream(), Response.OutputStream, Response.OutputStream);
                }

                return new EmptyResult();
            }
            else
            {
                return new HttpNotFoundResult();
            }
        }
示例#6
0
 private static void HandleReceivePackPost(HttpContext context, GitRoute route)
 {
     VerifyAccess(context);
     context.Response.ContentType = "application/x-git-receive-pack-result";
     var pack = new ReceivePack(route.Repository);
     pack.setBiDirectionalPipe(false);
     pack.receive(context.Request.InputStream, context.Response.OutputStream, context.Response.OutputStream);
 }
示例#7
0
        public void Receive(Stream inputStream, Stream outputStream)
        {
            using (var repository = GetRepository()) {
                var pack = new ReceivePack(repository);
                pack.setBiDirectionalPipe(false);

                if (PostRecieveHook != null) {
                    pack.setPostReceiveHook(PostRecieveHook);
                }

                pack.receive(inputStream, outputStream, outputStream);
            }
        }