Mercurial > hg > mercurial
changeset 1001:169e254da2a8 Jaipur-2018.1.x
TW-55764: hide Uncompressed transfer option as we no longer support it (since version 9 0)
(grafted from 6e4a700806e480c6421b9b3078d79c6d5334b0f2)
line wrap: on
line diff
--- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/Constants.java Thu Jun 21 17:37:32 2018 +0200 +++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/Constants.java Fri Jun 29 11:45:41 2018 +0200 @@ -26,7 +26,6 @@ String SERVER_CLONE_PATH_PROP = "serverClonePath"; String USERNAME = "username"; String PASSWORD = VcsRoot.SECURE_PROPERTY_PREFIX + "password"; - String UNCOMPRESSED_TRANSFER = "uncompressedTransfer"; String USER_FOR_TAG = "tagUsername"; String DETECT_SUBREPO_CHANGES = "detectSubrepoChanges"; String USE_TAGS_AS_BRANCHES = "useTagsAsBranches";
--- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CloneCommand.java Thu Jun 21 17:37:32 2018 +0200 +++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CloneCommand.java Fri Jun 29 11:45:41 2018 +0200 @@ -27,7 +27,6 @@ private String myRepository; private File myWorkingDir; private boolean myUsePullProtocol = true; - private boolean myUseUncompressedTransfer = false; private boolean myTraceback; public CloneCommand(@NotNull CommandSettings commandSettings, @@ -61,11 +60,6 @@ return this; } - public CloneCommand useUncompressedTransfer(boolean doUseUncompressedTransfer) { - myUseUncompressedTransfer = doUseUncompressedTransfer; - return this; - } - public CloneCommand setUsePullProtocol(boolean usePullProtocol) { myUsePullProtocol = usePullProtocol; return this; @@ -93,9 +87,6 @@ if (!myUpdateWorkingDir) { cli.addParameter("-U"); } - if (myUseUncompressedTransfer) { - cli.addParameter("--uncompressed"); - } CommandSettings settings = myCommandSettings.setTimeout(24 * 3600); // some repositories are quite large, we set timeout to 24 hours if (settings.getProgressConsumer() != null) {
--- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/HgVcsRoot.java Thu Jun 21 17:37:32 2018 +0200 +++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/HgVcsRoot.java Fri Jun 29 11:45:41 2018 +0200 @@ -38,7 +38,6 @@ private final String myRepository; private final String myHgCommandPath; private final String myBranchName; - private final boolean myUncompressedTransfer; private final String myCustomClonePath; private final String myUserForTag; private final AuthSettings myAuthSettings; @@ -62,7 +61,6 @@ myHgCommandPath = getProperty(Constants.HG_COMMAND_PATH_PROP); myBranchName = getProperty(Constants.BRANCH_NAME_PROP); myCustomClonePath = readCustomClonePath(); - myUncompressedTransfer = "true".equals(getProperty(Constants.UNCOMPRESSED_TRANSFER)); myUserForTag = getProperty(Constants.USER_FOR_TAG); myAuthSettings = new AuthSettings(getProperty(Constants.USERNAME), getProperty(Constants.PASSWORD)); myDetectSubrepoChanges = Boolean.parseBoolean(getProperty(Constants.DETECT_SUBREPO_CHANGES)); @@ -124,10 +122,6 @@ return StringUtil.isEmpty(myBranchName) ? DEFAULT_BRANCH_NAME : myBranchName; } - public boolean isUncompressedTransfer() { - return myUncompressedTransfer; - } - /** * @return path to hg command as it is set in VCS root settings */
--- a/mercurial-server/resources/buildServerResources/mercurialSettings.jsp Thu Jun 21 17:37:32 2018 +0200 +++ b/mercurial-server/resources/buildServerResources/mercurialSettings.jsp Fri Jun 29 11:45:41 2018 +0200 @@ -34,6 +34,7 @@ TeamCityProperties.getBoolean(Constants.CUSTOM_CLONE_PATH_ENABLED) && (TeamCityProperties.getBoolean(Constants.SHOW_CUSTOM_CLONE_PATH) || !StringUtil.isEmpty(propertiesBean.getProperties().get(Constants.SERVER_CLONE_PATH_PROP))) || HgVcsRoot.hasCustomClonePathWhitelist() %>"/> +<c:set var="hasUncompressedTransferOption" value='<%=!StringUtil.isEmpty(propertiesBean.getProperties().get("uncompressedTransfer"))%>'/> <table class="runnerFormTable"> <l:settingsGroup title="General Settings"> @@ -147,6 +148,10 @@ When this option is enabled, TeamCity creates a separate clone of the repository on each agent and uses it in the checkout directory via mercurial share extension. </div> + <c:if test="${hasUncompressedTransferOption}"> + <%-- we preserve this parameter because we don't want to show "Changes are not saved" stripe when user opens the edit VCS root page --%> + <props:hiddenProperty name="uncompressedTransfer"/> + </c:if> </td> </tr> </l:settingsGroup>
--- a/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Thu Jun 21 17:37:32 2018 +0200 +++ b/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Fri Jun 29 11:45:41 2018 +0200 @@ -196,7 +196,6 @@ Map<String, String> defaults = new HashMap<String, String>(); defaults.put(Constants.BRANCH_NAME_PROP, "default"); defaults.put(Constants.HG_COMMAND_PATH_PROP, "hg"); - defaults.put(Constants.UNCOMPRESSED_TRANSFER, "true"); return defaults; }
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/HgVcsRootTest.java Thu Jun 21 17:37:32 2018 +0200 +++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/HgVcsRootTest.java Fri Jun 29 11:45:41 2018 +0200 @@ -89,13 +89,6 @@ assertEquals("file:///path/to/repo", root.getRepositoryUrlWithCredentials()); } - public void uncompressed_transfer() { - VcsRootImpl vcsRoot = createVcsRoot("http://host.com/path"); - vcsRoot.addProperty(Constants.UNCOMPRESSED_TRANSFER, "true"); - HgVcsRoot root = new HgVcsRoot(vcsRoot); - assertTrue(root.isUncompressedTransfer()); - } - //TW-18262 public void ampersand_in_password() { VcsRootImpl vcsRoot = createVcsRoot("http://some.org/path", "user", "m&n");
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java Thu Jun 21 17:37:32 2018 +0200 +++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java Fri Jun 29 11:45:41 2018 +0200 @@ -656,15 +656,6 @@ assertFalse(rootProperties.containsKey(Constants.SERVER_CLONE_PATH_PROP)); } - public void use_compressed_transfer_by_default() { - VcsRootImpl root = new VcsRootImpl(1, Constants.VCS_NAME); - root.setProperties(myVcs.getDefaultVcsProperties()); - root.addProperty(Constants.REPOSITORY_PROP, "http://host.com/path"); - HgVcsRoot hgRoot = new HgVcsRoot(root); - assertTrue(hgRoot.isUncompressedTransfer()); - } - - //TW-15762 public void should_use_clone_to_root_parameter() throws IOException, VcsException { VcsRootImpl vcsRoot = createVcsRoot(simpleRepo());
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/VcsRootBuilder.java Thu Jun 21 17:37:32 2018 +0200 +++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/VcsRootBuilder.java Fri Jun 29 11:45:41 2018 +0200 @@ -37,7 +37,6 @@ private long myRootId = 1L; private String myHgPath; private String myUserForTag; - private boolean myUncompressed = true; private File myCloneRepositoryTo; private boolean myDetectSubrepoChanges = false; private boolean myTagsAsBranches = false; @@ -58,7 +57,6 @@ vcsRoot.addProperty(Constants.PASSWORD, myPassword); vcsRoot.addProperty(Constants.BRANCH_NAME_PROP, myBranch); vcsRoot.addProperty(Constants.USER_FOR_TAG, myUserForTag); - vcsRoot.addProperty(Constants.UNCOMPRESSED_TRANSFER, String.valueOf(myUncompressed)); vcsRoot.addProperty(Constants.DETECT_SUBREPO_CHANGES, String.valueOf(myDetectSubrepoChanges)); vcsRoot.addProperty(Constants.INCLUDE_SUBREPOS_IN_PATCH, String.valueOf(myIncludeSubreposInPatch)); vcsRoot.addProperty(Constants.USE_ARCHIVE_FOR_PATCH, String.valueOf(myUseArchiveForPatch));