changeset 849:03275807f45b

Fix tests on windows They didn't work because a support for a trailing newline in the end of shared path was added only in mercurial 2.0
author Dmitry Neverov <dmitry.neverov@jetbrains.com>
date Tue, 01 Jul 2014 13:10:27 +0200
parents e3fd75845c5d
children fcc2a5bf4238
files mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/SharingMercurialUpdater.java
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/SharingMercurialUpdater.java	Tue Jul 01 10:10:57 2014 +0200
+++ b/mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/SharingMercurialUpdater.java	Tue Jul 01 13:10:27 2014 +0200
@@ -25,7 +25,6 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.util.regex.Pattern;
 
 public class SharingMercurialUpdater extends MercurialIncludeRuleUpdater {
   public SharingMercurialUpdater(@NotNull AgentPluginConfig pluginConfig,
@@ -82,13 +81,7 @@
   }
 
   private void writeSharedPath(@NotNull File mirrorHg, @NotNull File workingDir) throws IOException {
-    FileUtil.writeToFile(getSharedPath(workingDir), getCanonicalSharedPath(mirrorHg).getBytes("UTF-8"));
-  }
-
-  @NotNull
-  private String getCanonicalSharedPath(@NotNull File mirrorHg) throws IOException {
-    String path = mirrorHg.getCanonicalPath();
-    return path.replaceAll(Pattern.quote("\\"), "/") + "\n";
+    FileUtil.writeToFile(getSharedPath(workingDir), mirrorHg.getCanonicalPath().getBytes("UTF-8"));
   }
 
   private void writeRequires(@NotNull File mirrorHg, @NotNull File workingDir) throws IOException {