Mercurial > kallithea
changeset 8147:fe93c67afc4d stable
ssh: use BaseSshHandler.__init__
This is the right thing to do ... and will be useful very soon.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 25 Jan 2020 21:04:50 +0100 |
parents | 042554aec0ac |
children | 7163feda7140 |
files | kallithea/lib/vcs/backends/git/ssh.py kallithea/lib/vcs/backends/hg/ssh.py kallithea/lib/vcs/backends/ssh.py |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/git/ssh.py Sat Jan 25 21:26:01 2020 +0100 +++ b/kallithea/lib/vcs/backends/git/ssh.py Sat Jan 25 21:04:50 2020 +0100 @@ -61,7 +61,7 @@ return None def __init__(self, repo_name, verb): - self.repo_name = repo_name + BaseSshHandler.__init__(self, repo_name) self.verb = verb def _serve(self):
--- a/kallithea/lib/vcs/backends/hg/ssh.py Sat Jan 25 21:26:01 2020 +0100 +++ b/kallithea/lib/vcs/backends/hg/ssh.py Sat Jan 25 21:04:50 2020 +0100 @@ -57,9 +57,6 @@ return None - def __init__(self, repo_name): - self.repo_name = repo_name - def _serve(self): # Note: we want a repo with config based on .hg/hgrc and can thus not use self.db_repo.scm_instance._repo.ui baseui = make_ui(repo_path=self.db_repo.repo_full_path)
--- a/kallithea/lib/vcs/backends/ssh.py Sat Jan 25 21:26:01 2020 +0100 +++ b/kallithea/lib/vcs/backends/ssh.py Sat Jan 25 21:04:50 2020 +0100 @@ -55,6 +55,9 @@ """ raise NotImplementedError + def __init__(self, repo_name): + self.repo_name = repo_name + def serve(self, user_id, key_id, client_ip): """Verify basic sanity of the repository, and that the user is valid and has access - then serve the native VCS protocol for