Mercurial > kallithea
changeset 8669:07cb7b42057e
imports: move all dulwich imports to top level
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 10 Oct 2020 20:33:27 +0200 |
parents | 2ff983214ea0 |
children | bf2286a3fc7e |
files | kallithea/lib/middleware/pygrack.py kallithea/lib/vcs/backends/git/changeset.py kallithea/lib/vcs/backends/git/repository.py |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/middleware/pygrack.py Sun Oct 11 01:07:51 2020 +0200 +++ b/kallithea/lib/middleware/pygrack.py Sat Oct 10 20:33:27 2020 +0200 @@ -30,6 +30,8 @@ import socket import traceback +from dulwich.server import update_server_info +from dulwich.web import GunzipFilter, LimitedInputFilter from webob import Request, Response, exc import kallithea @@ -168,7 +170,6 @@ if git_command in ['git-receive-pack']: # updating refs manually after each push. # Needed for pre-1.7.0.4 git clients using regular HTTP mode. - from dulwich.server import update_server_info from kallithea.lib.vcs import get_repo repo = get_repo(self.content_path) @@ -224,6 +225,5 @@ def make_wsgi_app(repo_name, repo_root): - from dulwich.web import GunzipFilter, LimitedInputFilter app = GitDirectory(repo_root, repo_name) return GunzipFilter(LimitedInputFilter(app))
--- a/kallithea/lib/vcs/backends/git/changeset.py Sun Oct 11 01:07:51 2020 +0200 +++ b/kallithea/lib/vcs/backends/git/changeset.py Sat Oct 10 20:33:27 2020 +0200 @@ -5,6 +5,7 @@ from dulwich import objects from dulwich.config import ConfigFile +from dulwich.walk import Walker from kallithea.lib.vcs.backends.base import BaseChangeset, EmptyChangeset from kallithea.lib.vcs.conf import settings @@ -294,7 +295,6 @@ """ self._get_filectx(path) - from dulwich.walk import Walker include = [self.raw_id] walker = Walker(self.repository._repo.object_store, include, paths=[path], max_entries=1)
--- a/kallithea/lib/vcs/backends/git/repository.py Sun Oct 11 01:07:51 2020 +0200 +++ b/kallithea/lib/vcs/backends/git/repository.py Sat Oct 10 20:33:27 2020 +0200 @@ -23,6 +23,7 @@ from dulwich.config import ConfigFile from dulwich.objects import Tag from dulwich.repo import NotGitRepository, Repo +from dulwich.server import update_server_info from kallithea.lib.vcs import subprocessio from kallithea.lib.vcs.backends.base import BaseRepository, CollectionGenerator @@ -661,7 +662,6 @@ """ runs gits update-server-info command in this repo instance """ - from dulwich.server import update_server_info try: update_server_info(self._repo) except OSError as e: