mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 00:45:44 +01:00
#970 added option to enable the experimental httppostargs protocol of mercurial
This commit is contained in:
@@ -127,6 +127,10 @@ public class HgConfig extends SimpleRepositoryConfig
|
||||
return disableHookSSLValidation;
|
||||
}
|
||||
|
||||
public boolean isEnableHttpPostArgs() {
|
||||
return enableHttpPostArgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -197,6 +201,10 @@ public class HgConfig extends SimpleRepositoryConfig
|
||||
this.showRevisionInId = showRevisionInId;
|
||||
}
|
||||
|
||||
public void setEnableHttpPostArgs(boolean enableHttpPostArgs) {
|
||||
this.enableHttpPostArgs = enableHttpPostArgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -232,6 +240,8 @@ public class HgConfig extends SimpleRepositoryConfig
|
||||
/** Field description */
|
||||
private boolean showRevisionInId = false;
|
||||
|
||||
private boolean enableHttpPostArgs = false;
|
||||
|
||||
/**
|
||||
* disable validation of ssl certificates for mercurial hook
|
||||
* @see <a href="https://goo.gl/zH5eY8">Issue 959</a>
|
||||
|
||||
@@ -87,6 +87,8 @@ public class HgCGIServlet extends HttpServlet
|
||||
/** Field description */
|
||||
public static final String ENV_REPOSITORY_PATH = "SCM_REPOSITORY_PATH";
|
||||
|
||||
private static final String ENV_HTTP_POST_ARGS = "SCM_HTTP_POST_ARGS";
|
||||
|
||||
/** Field description */
|
||||
public static final String ENV_SESSION_PREFIX = "SCM_";
|
||||
|
||||
@@ -278,11 +280,15 @@ public class HgCGIServlet extends HttpServlet
|
||||
environment.put(ENV_PYTHON_HTTPS_VERIFY, "0");
|
||||
}
|
||||
|
||||
// enable experimental httppostargs protocol of mercurial
|
||||
// Issue 970: https://goo.gl/poascp
|
||||
environment.put(ENV_HTTP_POST_ARGS, String.valueOf(handler.getConfig().isEnableHttpPostArgs()));
|
||||
|
||||
//J-
|
||||
HgEnvironment.prepareEnvironment(
|
||||
environment,
|
||||
handler,
|
||||
hookManager,
|
||||
hookManager,
|
||||
request
|
||||
);
|
||||
//J+
|
||||
|
||||
Reference in New Issue
Block a user