Use clone and push to create branches

Generalize workdir creation for git and hg and create branches in
clones instead of the scm repository, so that hooks will be fired
correctly once the changes are pushed back.

Missing:

- Evaluation of the git response from the push command
- configuration of the hg environment and the authentication, so that
  the scmhooks.py script can be triggeret correctly and can callback
  the scm manager
This commit is contained in:
René Pfeuffer
2019-03-27 10:08:20 +01:00
parent 58b7dff631
commit b65e84249d
25 changed files with 306 additions and 136 deletions

View File

@@ -46,6 +46,8 @@ import sonia.scm.plugin.Extension;
import sonia.scm.repository.HgContext;
import sonia.scm.repository.HgContextProvider;
import sonia.scm.repository.HgHookManager;
import sonia.scm.repository.spi.HgWorkdirFactory;
import sonia.scm.repository.spi.SimpleHgWorkdirFactory;
/**
*
@@ -81,5 +83,7 @@ public class HgServletModule extends ServletModule
// bind servlets
serve(MAPPING_HOOK).with(HgHookCallbackServlet.class);
bind(HgWorkdirFactory.class).to(SimpleHgWorkdirFactory.class);
}
}