# HG changeset patch # User Dmitry Neverov # Date 1404213027 -7200 # Node ID 03275807f45b9e1e83080c7cb99d36f3b2fb144a # Parent e3fd75845c5dae42fd327eba3d4ac3be51706f7f 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 diff -r e3fd75845c5d -r 03275807f45b mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/SharingMercurialUpdater.java --- 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 {