Exemplo n.º 1
0
    def response(self, request, username, project_slug):
        try:
            self.send_pre_signals()

            auth_response = self.check_auth()
            if auth_response:
                return auth_response

            git_server = GitWebServer(self.project.repository)
            response = git_server.get_response(request)

            self.send_post_signals()
        except Exception, err:
            log_error(err)
            raise err
Exemplo n.º 2
0
    def response(self, request, username, project_slug):
        try:
            self.send_pre_signals()

            auth_response = self.check_auth()
            if auth_response:
                return auth_response

            git_server = GitWebServer(self.project.repository)
            response = git_server.get_response(request)

            self.send_post_signals()
        except Exception, err:
            log_error(err)
            raise err
Exemplo n.º 3
0
    def response(self, request, username, project_slug):
        try:

            if is_mercurial(request):
                return self.response_hg(request, self.project)
            last_part = request.path.split('/')[-1]
            if last_part and last_part != project_slug:
                raise Http404("Not a mercurial request and path longer than "
                              " should be: %s" % request.path)

            # project is injected into the context at ProjectView constructor
            # so we do not need to add it here
            return self.context

        except Exception, err:
            dont_log_exceptions = (PermissionDenied, )
            if not isinstance(err, dont_log_exceptions):
                log_error(err)
            raise err
Exemplo n.º 4
0
    def response(self, request, username, project_slug):
        try:

            if is_mercurial(request):
                return self.response_hg(request, self.project)
            last_part = request.path.split('/')[-1]
            if last_part and last_part != project_slug:
                raise Http404("Not a mercurial request and path longer than "
                    " should be: %s" % request.path)

            # project is injected into the context at ProjectView constructor
            # so we do not need to add it here
            return self.context

        except Exception, err:
            dont_log_exceptions = (PermissionDenied,)
            if not isinstance(err, dont_log_exceptions):
                log_error(err)
            raise err