Mercurial > hg > mercurial
changeset 63:cef5cfe52e3e
do not set credentials in the url if url already has them
author | C:\Documents and Settings\pavel.sher\Application Data\The Bat! |
---|---|
date | Thu, 02 Jul 2009 20:14:58 +0400 |
parents | b328c6b6526d |
children | c9f14e3ef86d |
files | mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/Settings.java mercurial.ipr |
diffstat | 2 files changed, 31 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/Settings.java Wed Nov 26 19:12:27 2008 +0300 +++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/Settings.java Thu Jul 02 20:14:58 2009 +0400 @@ -103,6 +103,8 @@ * @return URL to use for push command */ public String getPushUrl() { + if (containsCredentials(myRepository)) return myRepository; + String cre = ""; if (!StringUtil.isEmpty(myUsername)) { cre += myUsername; @@ -121,6 +123,18 @@ return myRepository; } + private boolean containsCredentials(final String repository) { + for (String proto: AUTH_PROTOS) { + if (myRepository.startsWith(proto)) { + String withoutProto = myRepository.substring(proto.length()); + int comma = withoutProto.indexOf(':'); + int at = withoutProto.indexOf('@'); + if (at != -1 && comma != -1 && at > comma) return true; + } + } + return false; + } + public void setHgCommandPath(@NotNull final String hgCommandPath) { myHgCommandPath = hgCommandPath; }
--- a/mercurial.ipr Wed Nov 26 19:12:27 2008 +0300 +++ b/mercurial.ipr Thu Jul 02 20:14:58 2009 +0400 @@ -57,6 +57,9 @@ <entry name="?*.tag" /> </wildcardResourcePatterns> </component> + <component name="CopyrightManager" default=""> + <module2copyright /> + </component> <component name="DependenciesAnalyzeManager"> <option name="myForwardDirection" value="false" /> </component> @@ -99,15 +102,21 @@ <component name="IdProvider" IDEtalkID="317BB29ECB7DA19EFFA340ECF52563C6" /> <component name="InspectionProjectProfileManager"> <option name="PROJECT_PROFILE" value="Project Default" /> - <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" /> - <scopes /> + <option name="USE_PROJECT_PROFILE" value="true" /> + <version value="1.0" /> <profiles> <profile version="1.0" is_locked="false"> <option name="myName" value="Project Default" /> <option name="myLocal" value="false" /> </profile> </profiles> - <list size="0" /> + <list size="5"> + <item index="0" class="java.lang.String" itemvalue="INFO" /> + <item index="1" class="java.lang.String" itemvalue="WARNING" /> + <item index="2" class="java.lang.String" itemvalue="ERROR" /> + <item index="3" class="java.lang.String" itemvalue="MISSPELLED" /> + <item index="4" class="java.lang.String" itemvalue="SERVER PROBLEM" /> + </list> </component> <component name="JavacSettings"> <option name="DEBUGGING_INFO" value="true" /> @@ -286,6 +295,9 @@ <option name="projectName" value="mercurial" /> </component> <component name="ProjectFileVersion" converted="true" /> + <component name="ProjectKey"> + <option name="state" value="project://C:\Work\mercurial\mercurial.ipr" /> + </component> <component name="ProjectLibrariesConfigurable.UI"> <option name="proportions"> <SplitterProportionsDataImpl /> @@ -305,7 +317,7 @@ <SplitterProportionsDataImpl /> </option> </component> - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.5.latest" project-jdk-type="JavaSDK" /> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK" /> <component name="ResourceManagerContainer"> <option name="myResourceBundles"> <value> @@ -342,6 +354,7 @@ </component> <component name="SvnBranchConfigurationManager"> <option name="myVersion" value="123" /> + <option name="mySupportsUserInfoFilter" value="true" /> </component> <component name="SvnChangesBrowserSettings"> <option name="USE_AUTHOR_FIELD" value="true" />