Mercurial > hg > mercurial
changeset 899:e7b716719044
TW-36401 hide 'Clone repository to' option
It is shown if enabled by internal property or when VCS root already has this
option specified.
author | Dmitry Neverov <dmitry.neverov@jetbrains.com> |
---|---|
date | Thu, 13 Nov 2014 14:44:52 +0100 |
parents | 638d979c6117 |
children | b83484e825b7 |
files | mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/Constants.java mercurial-server/resources/buildServerResources/mercurialSettings.jsp |
diffstat | 2 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/Constants.java Wed Nov 12 17:30:16 2014 +0100 +++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/Constants.java Thu Nov 13 14:44:52 2014 +0100 @@ -40,4 +40,6 @@ String CUSTOM_HG_CONFIG_PROP = "customHgConfig"; String TEAMCITY_HG_CONFIG_FILE_NAME = "teamcity"; String USE_AGENT_MIRRORS = "useSharedMirrors"; + + String SHOW_CUSTOM_CLONE_PATH = "teamcity.hg.showCustomClonePath"; }
--- a/mercurial-server/resources/buildServerResources/mercurialSettings.jsp Wed Nov 12 17:30:16 2014 +0100 +++ b/mercurial-server/resources/buildServerResources/mercurialSettings.jsp Thu Nov 13 14:44:52 2014 +0100 @@ -1,5 +1,6 @@ <%@ page import="jetbrains.buildServer.serverSide.TeamCityProperties" %> <%@ page import="jetbrains.buildServer.buildTriggers.vcs.mercurial.Constants" %> +<%@ page import="jetbrains.buildServer.util.StringUtil" %> <%@include file="/include.jsp"%> <%@ taglib prefix="props" tagdir="/WEB-INF/tags/props" %> <%-- @@ -27,6 +28,7 @@ } </script> <c:set var="subreposGloballyDisabled" value="<%= !TeamCityProperties.getBooleanOrTrue(Constants.GLOBAL_DETECT_SUBREPO_CHANGES) %>"/> +<c:set var="showCustomClonePath" value="<%= TeamCityProperties.getBoolean(Constants.SHOW_CUSTOM_CLONE_PATH) || !StringUtil.isEmpty(propertiesBean.getProperties().get(Constants.SERVER_CLONE_PATH_PROP))%>"/> <table class="runnerFormTable"> <l:settingsGroup title="General Settings"> @@ -50,12 +52,14 @@ <label for="reportTagRevisions">If enabled tags can be used in branch specification</label> </td> </tr> - <tr class="advancedSetting"> - <th><label for="serverClonePath">Clone repository to: </label></th> - <td><props:textProperty name="serverClonePath" className="longField"/> - <div class="smallNote" style="margin: 0;">Provide path to a parent directory on TeamCity server where a cloned repository should be created (applicable to "Automatically on server" checkout mode only). Leave blank to use default path.</div> - </td> - </tr> + <c:if test="${showCustomClonePath}"> + <tr class="advancedSetting"> + <th><label for="serverClonePath">Clone repository to: </label></th> + <td><props:textProperty name="serverClonePath" className="longField"/> + <div class="smallNote" style="margin: 0;">Provide path to a parent directory on TeamCity server where a cloned repository should be created (applicable to "Automatically on server" checkout mode only). Leave blank to use default path.</div> + </td> + </tr> + </c:if> <tr class="advancedSetting"> <th><label for="detectSubrepoChanges">Detect subrepo changes: </label></th> <td>