Implement mercurial cgi protocol as extension (#1458)

* Handle mercurial cgi protocol with an hg extension
* Refactor CGI executor to allow command arguments
* Unify python scripts and hg extensions
* Implement new auto configuration
* Use HKEY_LOCAL_MACHINE instead of
  HKEY_CURRENT_USER registry keys to find mercurial
  installations on windows
This commit is contained in:
Sebastian Sdorra
2020-12-17 10:06:55 +01:00
committed by René Pfeuffer
parent 99d389b2af
commit b61d817c9c
65 changed files with 1164 additions and 4327 deletions

View File

@@ -29,10 +29,7 @@ package sonia.scm.web;
import com.google.inject.servlet.ServletModule;
import org.mapstruct.factory.Mappers;
import sonia.scm.api.v2.resources.HgConfigDtoToHgConfigMapper;
import sonia.scm.api.v2.resources.HgConfigInstallationsToDtoMapper;
import sonia.scm.api.v2.resources.HgConfigPackagesToDtoMapper;
import sonia.scm.api.v2.resources.HgConfigToHgConfigDtoMapper;
import sonia.scm.installer.HgPackageReader;
import sonia.scm.plugin.Extension;
import sonia.scm.repository.spi.HgWorkingCopyFactory;
import sonia.scm.repository.spi.SimpleHgWorkingCopyFactory;
@@ -46,12 +43,8 @@ public class HgServletModule extends ServletModule {
@Override
protected void configureServlets() {
bind(HgPackageReader.class);
bind(HgConfigDtoToHgConfigMapper.class).to(Mappers.getMapper(HgConfigDtoToHgConfigMapper.class).getClass());
bind(HgConfigToHgConfigDtoMapper.class).to(Mappers.getMapper(HgConfigToHgConfigDtoMapper.class).getClass());
bind(HgConfigPackagesToDtoMapper.class).to(Mappers.getMapper(HgConfigPackagesToDtoMapper.class).getClass());
bind(HgConfigInstallationsToDtoMapper.class);
bind(HgWorkingCopyFactory.class).to(SimpleHgWorkingCopyFactory.class);
}