mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
fixed integration of mercurial config changes of 1.x
This commit is contained in:
@@ -19,6 +19,8 @@ public class HgConfigDto extends HalRepresentation {
|
||||
private String pythonPath;
|
||||
private boolean useOptimizedBytecode;
|
||||
private boolean showRevisionInId;
|
||||
private boolean enableHttpPostArgs;
|
||||
private boolean disableHookSSLValidation;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("squid:S1185") // We want to have this method available in this package
|
||||
|
||||
@@ -11,6 +11,8 @@ type Configuration = {
|
||||
"encoding": string,
|
||||
"useOptimizedBytecode": boolean,
|
||||
"showRevisionInId": boolean,
|
||||
"disableHookSSLValidation": boolean,
|
||||
"enableHttpPostArgs": boolean,
|
||||
"disabled": boolean,
|
||||
"_links": Links
|
||||
};
|
||||
@@ -101,6 +103,8 @@ class HgConfigurationForm extends React.Component<Props, State> {
|
||||
{this.inputField("encoding")}
|
||||
{this.checkbox("useOptimizedBytecode")}
|
||||
{this.checkbox("showRevisionInId")}
|
||||
{this.checkbox("disableHookSSLValidation")}
|
||||
{this.checkbox("enableHttpPostArgs")}
|
||||
{this.checkbox("disabled")}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
"useOptimizedBytecodeHelpText": "Use the Python '-O' switch.",
|
||||
"showRevisionInId": "Show Revision",
|
||||
"showRevisionInIdHelpText": "Show revision as part of the node id.",
|
||||
"enableHttpPostArgs": "Enable HttpPostArgs Protocol",
|
||||
"enableHttpPostArgsHelpText": "Disables the validation of ssl certificates for the mercurial hook, which forwards the repository changes back to scm-manager. This option should only be used, if SCM-Manager uses a self signed certificate.",
|
||||
"disableHookSSLValidation": "Disable SSL Validation on Hooks",
|
||||
"disableHookSSLValidationHelpText": "Enables the experimental HttpPostArgs Protocol of mercurial. The HttpPostArgs Protocol uses the body of post requests to send the meta information instead of http headers. This helps to reduce the header size of mercurial requests. HttpPostArgs is supported since mercurial 3.8.",
|
||||
"disabled": "Disabled",
|
||||
"disabledHelpText": "Enable or disable the Mercurial plugin.",
|
||||
"required": "This configuration value is required"
|
||||
|
||||
@@ -30,6 +30,8 @@ public class HgConfigDtoToHgConfigMapperTest {
|
||||
assertEquals("/etc/", config.getPythonPath());
|
||||
assertTrue(config.isShowRevisionInId());
|
||||
assertTrue(config.isUseOptimizedBytecode());
|
||||
assertTrue(config.isDisableHookSSLValidation());
|
||||
assertTrue(config.isEnableHttpPostArgs());
|
||||
}
|
||||
|
||||
private HgConfigDto createDefaultDto() {
|
||||
@@ -41,6 +43,8 @@ public class HgConfigDtoToHgConfigMapperTest {
|
||||
configDto.setPythonPath("/etc/");
|
||||
configDto.setShowRevisionInId(true);
|
||||
configDto.setUseOptimizedBytecode(true);
|
||||
configDto.setDisableHookSSLValidation(true);
|
||||
configDto.setEnableHttpPostArgs(true);
|
||||
|
||||
return configDto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user