##// END OF EJS Templates
fix(git ops): moved git operations into vcsserver and use libgit2 when possible....
fix(git ops): moved git operations into vcsserver and use libgit2 when possible. This fixes issues with calling merge-base on repos that are not fully in sync

File last commit:

r1327:278da2b3 default
r1337:1fc1a507 default
Show More
remote_wsgi.py
47 lines | 1.1 KiB | text/x-python | PythonLexer
core: updated copyrights to 2024
r1327 # Copyright (C) 2014-2024 RhodeCode GmbH
source-code: updated copyrights to 2023
r1126
initial commit
r0 """
Provides the same API as :mod:`remote_wsgi`.
Uses the `EchoApp` instead of real implementations.
"""
import logging
from .echo_app import EchoApp
from vcsserver import wsgi_app_caller
log = logging.getLogger(__name__)
lint: auto-fixes
r1152 class GitRemoteWsgi:
initial commit
r0 def handle(self, environ, input_data, *args, **kwargs):
app = wsgi_app_caller.WSGIAppCaller(
create_echo_wsgi_app(*args, **kwargs))
return app.handle(environ, input_data)
lint: auto-fixes
r1152 class HgRemoteWsgi:
initial commit
r0 def handle(self, environ, input_data, *args, **kwargs):
app = wsgi_app_caller.WSGIAppCaller(
create_echo_wsgi_app(*args, **kwargs))
return app.handle(environ, input_data)
def create_echo_wsgi_app(repo_path, repo_name, config):
log.debug("Creating EchoApp WSGI application")
_assert_valid_config(config)
# Remaining items are forwarded to have the extras available
return EchoApp(repo_path, repo_name, config=config)
def _assert_valid_config(config):
config = config.copy()
# This is what git needs from config at this stage
fix(LFS): fixed LFSOidStorage, enbled LFS fetching on repo fetch, fixed tests and python3 transition related leftovers. Fixes: RCCE-8
r1194 config.pop('git_update_server_info')