merge with branch 1.x

This commit is contained in:
Sebastian Sdorra
2017-01-12 19:50:39 +01:00
250 changed files with 16399 additions and 1573 deletions

View File

@@ -35,6 +35,7 @@ package sonia.scm.web;
//~--- non-JDK imports --------------------------------------------------------
import com.google.common.base.Stopwatch;
import com.google.common.base.Strings;
import com.google.inject.Inject;
import com.google.inject.Singleton;
@@ -130,6 +131,7 @@ public class HgCGIServlet extends HttpServlet
this.hookManager = hookManager;
this.requestListenerUtil = requestListenerUtil;
this.exceptionHandler = new HgCGIExceptionHandler();
this.command = HgPythonScript.HGWEB.getFile(SCMContext.getContext());
}
//~--- methods --------------------------------------------------------------
@@ -143,7 +145,7 @@ public class HgCGIServlet extends HttpServlet
@Override
public void init() throws ServletException
{
command = HgPythonScript.HGWEB.getFile(SCMContext.getContext());
super.init();
}
@@ -184,7 +186,11 @@ public class HgCGIServlet extends HttpServlet
{
handleRequest(request, response, repository);
}
catch (Exception ex)
catch (ServletException ex)
{
exceptionHandler.handleException(request, response, ex);
}
catch (IOException ex)
{
exceptionHandler.handleException(request, response, ex);
}
@@ -241,7 +247,9 @@ public class HgCGIServlet extends HttpServlet
{
if (requestListenerUtil.callListeners(request, response, repository))
{
Stopwatch sw = Stopwatch.createStarted();
process(request, response, repository);
logger.debug("mercurial request finished in {}", sw.stop());
}
else if (logger.isDebugEnabled())
{
@@ -358,26 +366,26 @@ public class HgCGIServlet extends HttpServlet
//~--- fields ---------------------------------------------------------------
/** Field description */
private CGIExecutorFactory cgiExecutorFactory;
private final CGIExecutorFactory cgiExecutorFactory;
/** Field description */
private File command;
private final File command;
/** Field description */
private ScmConfiguration configuration;
private final ScmConfiguration configuration;
/** Field description */
private HgCGIExceptionHandler exceptionHandler;
private final HgCGIExceptionHandler exceptionHandler;
/** Field description */
private HgRepositoryHandler handler;
private final HgRepositoryHandler handler;
/** Field description */
private HgHookManager hookManager;
private final HgHookManager hookManager;
/** Field description */
private RepositoryProvider repositoryProvider;
private final RepositoryProvider repositoryProvider;
/** Field description */
private RepositoryRequestListenerUtil requestListenerUtil;
private final RepositoryRequestListenerUtil requestListenerUtil;
}