changeset 734:a75aae928f79

Fix url resolving on windows
author Dmitry Neverov <dmitry.neverov@jetbrains.com>
date Tue, 21 Jan 2014 19:27:38 +0100
parents 5211baefb5ec
children 73364919b7cc
files mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/SubRepo.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/SubRepo.java	Thu Jan 16 13:56:33 2014 +0100
+++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/SubRepo.java	Tue Jan 21 19:27:38 2014 +0100
@@ -75,11 +75,9 @@
   }
 
   @NotNull
-  public String resolveUrl(@NotNull String parentRepoUrl) throws WrongSubrepoUrlException {
-    if (!parentRepoUrl.endsWith("/"))
-      parentRepoUrl = parentRepoUrl + "/";
+  public String resolveUrl(@NotNull final String parentRepoUrl) throws WrongSubrepoUrlException {
     try {
-      URI parentURI = new URI(parentRepoUrl);
+      URI parentURI = parentRepoUrl.endsWith("/") ? new URI(parentRepoUrl) : new URI(parentRepoUrl + "/");
       URI subrepoAbsUrl = parentURI.resolve(url());
       if (isSsh(subrepoAbsUrl) && isPathFromRoot(parentURI))
         return getUrlWithPathFromRoot(subrepoAbsUrl);