changeset 945:2f876a09cb99

Merge branch Hajipur-9.1.x
author Dmitry Neverov <dmitry.neverov@gmail.com>
date Tue, 02 Feb 2016 18:59:10 +0100
parents 07a7f22d8954 (diff) ed49cbc93aa3 (current diff)
children 50968ab011d9
files
diffstat 15 files changed, 86 insertions(+), 241 deletions(-) [+]
line wrap: on
line diff
--- a/.idea/compiler.xml	Tue Feb 02 18:52:25 2016 +0100
+++ b/.idea/compiler.xml	Tue Feb 02 18:59:10 2016 +0100
@@ -27,7 +27,5 @@
         <processorPath useClasspath="true" />
       </profile>
     </annotationProcessing>
-    <bytecodeTargetLevel target="1.5" />
   </component>
-</project>
-
+</project>
\ No newline at end of file
--- a/.idea/encodings.xml	Tue Feb 02 18:52:25 2016 +0100
+++ b/.idea/encodings.xml	Tue Feb 02 18:59:10 2016 +0100
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
-</project>
-
+  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false">
+    <file url="PROJECT" charset="UTF-8" />
+  </component>
+</project>
\ No newline at end of file
--- a/.idea/misc.xml	Tue Feb 02 18:52:25 2016 +0100
+++ b/.idea/misc.xml	Tue Feb 02 18:59:10 2016 +0100
@@ -4,6 +4,5 @@
     <entry_points version="2.0" />
   </component>
   <component name="IdProvider" IDEtalkID="C52C76224CD45BEC1DC62428B699D800" />
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK" />
-</project>
-
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
+</project>
\ No newline at end of file
--- a/mercurial-agent/mercurial-agent.iml	Tue Feb 02 18:52:25 2016 +0100
+++ b/mercurial-agent/mercurial-agent.iml	Tue Feb 02 18:59:10 2016 +0100
@@ -5,16 +5,15 @@
       <configuration />
     </facet>
   </component>
-  <component name="NewModuleRootManager" inherit-compiler-output="false">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
     <output url="file://$MODULE_DIR$/classes" />
     <exclude-output />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
     </content>
-    <orderEntry type="inheritedJdk" />
+    <orderEntry type="jdk" jdkName="1.6" jdkType="JavaSDK" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" name="TeamCityAPI-agent" level="project" />
     <orderEntry type="module" module-name="mercurial-common" />
   </component>
-</module>
-
+</module>
\ No newline at end of file
--- a/mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialAgentSideVcsSupport.java	Tue Feb 02 18:52:25 2016 +0100
+++ b/mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialAgentSideVcsSupport.java	Tue Feb 02 18:59:10 2016 +0100
@@ -16,17 +16,12 @@
 package jetbrains.buildServer.buildTriggers.vcs.mercurial;
 
 import jetbrains.buildServer.agent.AgentRunningBuild;
-import jetbrains.buildServer.agent.vcs.AgentVcsSupport;
-import jetbrains.buildServer.agent.vcs.IncludeRuleUpdater;
-import jetbrains.buildServer.agent.vcs.UpdateByIncludeRules2;
-import jetbrains.buildServer.agent.vcs.UpdatePolicy;
+import jetbrains.buildServer.agent.vcs.*;
 import jetbrains.buildServer.buildTriggers.vcs.mercurial.command.HgVcsRoot;
 import jetbrains.buildServer.buildTriggers.vcs.mercurial.ext.CheckoutInfo;
 import jetbrains.buildServer.buildTriggers.vcs.mercurial.ext.MercurialExtension;
 import jetbrains.buildServer.buildTriggers.vcs.mercurial.ext.MercurialExtensionManager;
-import jetbrains.buildServer.vcs.CheckoutRules;
-import jetbrains.buildServer.vcs.VcsException;
-import jetbrains.buildServer.vcs.VcsRoot;
+import jetbrains.buildServer.vcs.*;
 import org.jetbrains.annotations.NotNull;
 
 import java.io.File;
@@ -59,6 +54,25 @@
     return updater;
   }
 
+  @NotNull
+  @Override
+  public AgentCheckoutAbility canCheckout(@NotNull VcsRoot vcsRoot, @NotNull CheckoutRules checkoutRules, @NotNull AgentRunningBuild build) {
+    CheckoutInfo info = new CheckoutInfo(myRepoFactory, new HgVcsRoot(vcsRoot), checkoutRules);
+    try {
+      info.getTempDirRepo().version().call();
+    } catch (VcsException e) {
+      return AgentCheckoutAbility.noVcsClientOnAgent(e.getMessage());
+    }
+
+    try {
+      for (IncludeRule rule : checkoutRules.getRootIncludeRules()) {
+        MercurialIncludeRuleUpdater.checkRuleIsValid(rule);
+      }
+      return AgentCheckoutAbility.canCheckout();
+    } catch (VcsException e) {
+      return AgentCheckoutAbility.notSupportedCheckoutRules(e.getMessage());
+    }
+  }
 
   private void registerExtensions(@NotNull VcsRoot root, @NotNull CheckoutRules checkoutRules, @NotNull MercurialIncludeRuleUpdater updater) {
     CheckoutInfo info = new CheckoutInfo(myRepoFactory, new HgVcsRoot(root), checkoutRules);
--- a/mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialIncludeRuleUpdater.java	Tue Feb 02 18:52:25 2016 +0100
+++ b/mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialIncludeRuleUpdater.java	Tue Feb 02 18:59:10 2016 +0100
@@ -269,11 +269,9 @@
   }
 
 
-  private void checkRuleIsValid(IncludeRule includeRule) throws VcsException {
-    if (includeRule.getTo() != null && includeRule.getTo().length() > 0) {
-      if (!".".equals(includeRule.getFrom()) && includeRule.getFrom().length() != 0)
-        throw new VcsException("Invalid include rule: " + includeRule.toString() + ", Mercurial plugin supports mapping of the form: +:.=>dir only.");
-    }
+  public static void checkRuleIsValid(IncludeRule includeRule) throws VcsException {
+    if (!".".equals(includeRule.getFrom()) && includeRule.getFrom().length() != 0)
+      throw new VcsException("Invalid include rule: " + includeRule.toString() + ", Mercurial plugin supports mapping of the form: +:.=>dir only.");
   }
 
 
--- a/mercurial-common/mercurial-common.iml	Tue Feb 02 18:52:25 2016 +0100
+++ b/mercurial-common/mercurial-common.iml	Tue Feb 02 18:59:10 2016 +0100
@@ -1,17 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module relativePaths="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="false">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
     <output url="file://$MODULE_DIR$/classes" />
     <exclude-output />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
     </content>
-    <orderEntry type="inheritedJdk" />
+    <orderEntry type="jdk" jdkName="1.6" jdkType="JavaSDK" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" exported="" name="TeamCityAPI-common" level="project" />
     <orderEntry type="library" exported="" name="IDEA-openapi" level="project" />
     <orderEntry type="library" name="jdom" level="project" />
     <orderEntry type="library" name="commons-codec-1.4" level="project" />
   </component>
-</module>
-
+</module>
\ No newline at end of file
--- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CommandResult.java	Tue Feb 02 18:52:25 2016 +0100
+++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CommandResult.java	Tue Feb 02 18:59:10 2016 +0100
@@ -270,7 +270,7 @@
   }
 
   private void checkAbandonedTransaction(@NotNull final String stderr) throws AbandonedTransactionFound {
-    if (stderr.contains("abort: abandoned transaction found - run hg recover"))
+    if (stderr.contains("abort: abandoned transaction found") && stderr.contains("hg recover"))
       throw new AbandonedTransactionFound();
   }
 
--- a/mercurial-server/resources/buildServerResources/mercurialSettings.jsp	Tue Feb 02 18:52:25 2016 +0100
+++ b/mercurial-server/resources/buildServerResources/mercurialSettings.jsp	Tue Feb 02 18:59:10 2016 +0100
@@ -37,6 +37,7 @@
   <tr>
     <th><label for="repositoryPath">Pull changes from: <l:star/></label></th>
     <td><props:textProperty name="repositoryPath" className="longField" onchange="updateBranchName(this.value)"/>
+      <jsp:include page="/admin/repositoryControls.html?projectId=${parentProject.externalId}&vcsType=hg"/>
       <span class="error" id="error_repositoryPath"></span></td>
   </tr>
   <tr>
@@ -141,4 +142,18 @@
       </td>
     </tr>
   </l:settingsGroup>
+  <script type="text/javascript">
+    $j(document).ready(function() {
+      if (BS.Repositories != null) {
+        BS.Repositories.installControls($('repositoryPath'), function (repoInfo, cre) {
+          $('repositoryPath').value = repoInfo.repositoryUrl;
+          if (cre != null) {
+            $('username').value = cre.oauthLogin;
+          }
+        });
+      } else {
+        $j('.listRepositoriesControls').hide();
+      }
+    });
+  </script>
 </table>
--- a/mercurial-server/src/META-INF/build-server-plugin-mercurial.xml	Tue Feb 02 18:52:25 2016 +0100
+++ b/mercurial-server/src/META-INF/build-server-plugin-mercurial.xml	Tue Feb 02 18:59:10 2016 +0100
@@ -31,7 +31,6 @@
   <bean id="commitSupport" class="jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialCommitSupport"/>
 
   <bean class="jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialCommitsInfoBuilderSupport"/>
-  <bean class="jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialModificationInfoBuilder"/>
 
   <bean class="jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandSettingsForRootImpl"/>
   <bean class="jetbrains.buildServer.buildTriggers.vcs.mercurial.command.ExtensionsWeaver"/>
--- a/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialModificationInfoBuilder.java	Tue Feb 02 18:52:25 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright 2000-2014 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package jetbrains.buildServer.buildTriggers.vcs.mercurial;
-
-import jetbrains.buildServer.buildTriggers.vcs.mercurial.command.ChangeSet;
-import jetbrains.buildServer.buildTriggers.vcs.mercurial.command.HgVcsRoot;
-import jetbrains.buildServer.vcs.*;
-import org.jetbrains.annotations.NotNull;
-
-import java.util.Collection;
-import java.util.Collections;
-
-public class MercurialModificationInfoBuilder implements ChangesInfoBuilder, MercurialServerExtension {
-
-  private final MercurialVcsSupport myVcs;
-  private final HgVcsRootFactory myHgVcsRootFactory;
-  private final RepoFactory myRepoFactory;
-  private final HgPathProvider myHgPathProvider;
-
-  public MercurialModificationInfoBuilder(@NotNull MercurialVcsSupport vcs,
-                                          @NotNull HgVcsRootFactory hgVcsRootFactory,
-                                          @NotNull RepoFactory repoFactory,
-                                          @NotNull HgPathProvider hgPathProvider) {
-    myVcs = vcs;
-    myHgVcsRootFactory = hgVcsRootFactory;
-    myRepoFactory = repoFactory;
-    myHgPathProvider = hgPathProvider;
-    myVcs.addExtension(this);
-  }
-
-  public void fetchChangesInfo(@NotNull final VcsRoot root,
-                               @NotNull final CheckoutRules checkoutRules,
-                               @NotNull final Collection<String> revisions,
-                               @NotNull final ChangesConsumer consumer) throws VcsException {
-    final HgVcsRoot hgRoot = myHgVcsRootFactory.createHgRoot(root);
-
-    final CollectChangesContext ctx = new CollectChangesContext(myVcs,
-            myRepoFactory,
-            MercurialProgress.NO_OP,
-            Collections.<String>emptyList());
-
-    //TODO: it's better if we call log command once (or by chunks) instead of simple for-each
-    for (String commitId : revisions) {
-      for (ChangeSet set : myVcs.createRepo(hgRoot).log().withRevsets(commitId).call()) {
-        consumer.consumeChange(ModificationDataFactory.createModificationData(ctx, set, root, checkoutRules));
-      }
-    }
-  }
-}
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/AgentSideCheckoutTest.java	Tue Feb 02 18:52:25 2016 +0100
+++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/AgentSideCheckoutTest.java	Tue Feb 02 18:59:10 2016 +0100
@@ -15,10 +15,8 @@
  */
 package jetbrains.buildServer.buildTriggers.vcs.mercurial;
 
-import jetbrains.buildServer.agent.AgentRunningBuild;
-import jetbrains.buildServer.agent.BuildAgentConfiguration;
-import jetbrains.buildServer.agent.BuildProgressLogger;
-import jetbrains.buildServer.agent.FlowLogger;
+import jetbrains.buildServer.agent.*;
+import jetbrains.buildServer.agent.vcs.AgentCheckoutAbility;
 import jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandSettingsForRootImpl;
 import jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommandlineViaFileWrapperWeaver;
 import jetbrains.buildServer.buildTriggers.vcs.mercurial.command.ExtensionsWeaver;
@@ -26,11 +24,9 @@
 import jetbrains.buildServer.buildTriggers.vcs.mercurial.ext.MercurialExtensionManager;
 import jetbrains.buildServer.util.FileUtil;
 import jetbrains.buildServer.util.TestFor;
-import jetbrains.buildServer.vcs.CheckoutRules;
-import jetbrains.buildServer.vcs.IncludeRule;
-import jetbrains.buildServer.vcs.VcsException;
-import jetbrains.buildServer.vcs.VcsRoot;
+import jetbrains.buildServer.vcs.*;
 import jetbrains.buildServer.vcs.impl.VcsRootImpl;
+import org.hamcrest.CoreMatchers;
 import org.jetbrains.annotations.NotNull;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
@@ -45,6 +41,8 @@
 import java.util.concurrent.*;
 
 import static jetbrains.buildServer.buildTriggers.vcs.mercurial.Util.copyRepository;
+import static org.hamcrest.MatcherAssert.*;
+import static org.hamcrest.text.StringContains.containsString;
 
 /**
  * @author Pavel.Sher
@@ -103,6 +101,22 @@
     testUpdate(root, "b06a290a363b", "cleanPatch1/after", new IncludeRule(".", ".", null));
   }
 
+  public void auto_checkout_when_hg_client_not_found() throws Exception {
+    VcsRootImpl root = new VcsRootBuilder().withUrl(copyRepository(myTempFiles, simpleRepo()).getAbsolutePath()).withHgPath("invalid_hg_path").build();
+
+    AgentCheckoutAbility agentCheckoutAbility = myVcsSupport.canCheckout(root, CheckoutRules.DEFAULT, myContext.mock(AgentRunningBuild.class, "build" + myBuildCounter++));
+
+    assertThat(agentCheckoutAbility.getCanNotCheckoutReason().getType(), CoreMatchers.equalTo(AgentCanNotCheckoutReason.NO_VCS_CLIENT));
+  }
+
+  public void auto_checkout_when_unsupported_include_rule_is_used() throws Exception {
+    VcsRootImpl root = createVcsRoot(simpleRepo());
+
+    AgentCheckoutAbility agentCheckoutAbility = myVcsSupport.canCheckout(root, new CheckoutRules("+:subdir=>subdir2"), myContext.mock(AgentRunningBuild.class, "build" + myBuildCounter++));
+
+    assertThat(agentCheckoutAbility.getCanNotCheckoutReason().getType(), CoreMatchers.equalTo(AgentCanNotCheckoutReason.NOT_SUPPORTED_CHECKOUT_RULES));
+    assertThat(agentCheckoutAbility.getCanNotCheckoutReason().getDetails(), containsString("Invalid include rule: subdir=>subdir2"));
+  }
 
   public void checkout_on_agent() throws IOException, VcsException {
     testUpdate(createVcsRoot(simpleRepo()), "4:b06a290a363b", "cleanPatch1/after", new IncludeRule(".", ".", null));
@@ -112,6 +126,16 @@
     testUpdate(createVcsRoot(simpleRepo()), "4:b06a290a363b", "cleanPatch1/after", new IncludeRule("+:.", "subdir", null));
   }
 
+  @TestFor(issues = "TW-19761")
+  public void include_subdir_is_not_supported() throws Exception {
+    try {
+      testUpdate(createVcsRoot(simpleRepo()), "4:b06a290a363b", "cleanPatch1/after", new IncludeRule("+:subdir", ".", null));
+      fail("should fail");
+    } catch (VcsException e) {
+      assertTrue(e.getMessage().contains("Invalid include rule"));
+    }
+  }
+
   private void testUpdate(final VcsRoot vcsRoot, String version, String expected, final IncludeRule includeRule) throws VcsException, IOException {
     File workDir = doUpdate(vcsRoot, version, includeRule);
 
@@ -154,6 +178,7 @@
       allowing(build).getBuildLogger(); will(returnValue(myLogger));
       allowing(build).getSharedConfigParameters(); will(returnValue(sharedConfigParameters));
     }});
+    assertNull(myVcsSupport.canCheckout(vcsRoot, new CheckoutRules(""), build).getCanNotCheckoutReason());
     myVcsSupport.getUpdater(vcsRoot, new CheckoutRules(""), version, myWorkDir, build, false).process(includeRule, actualWorkDir);
 
     File hgDir = new File(actualWorkDir, ".hg");
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialModificationInfoBuilderTest.java	Tue Feb 02 18:52:25 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
- * Copyright 2000-2014 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package jetbrains.buildServer.buildTriggers.vcs.mercurial;
-
-import jetbrains.buildServer.vcs.ChangesConsumer;
-import jetbrains.buildServer.vcs.CheckoutRules;
-import jetbrains.buildServer.vcs.VcsRoot;
-import jetbrains.vcs.api.ChangeData;
-import org.jetbrains.annotations.NotNull;
-import org.testng.Assert;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import static jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialSupportBuilder.mercurialSupport;
-import static jetbrains.buildServer.buildTriggers.vcs.mercurial.ServerPluginConfigBuilder.serverPluginConfig;
-import static jetbrains.buildServer.buildTriggers.vcs.mercurial.VcsRootBuilder.vcsRoot;
-import static org.testng.AssertJUnit.assertEquals;
-
-@RequiredHgVersion(min = "1.7.0")
-@Test(dataProviderClass = HgVersionConstraint.class, dataProvider = "installedHgVersion")
-public class MercurialModificationInfoBuilderTest extends BaseMercurialTestCase {
-
-  private File myRemoteRepository;
-  private MercurialModificationInfoBuilder myModInfoBuilder;
-  private MercurialVcsSupport myVcs;
-
-  @BeforeMethod
-  public void setUp() throws Exception {
-    super.setUp();
-    ServerPluginConfig config = serverPluginConfig()
-            .cachesDir(myTempFiles.createTempDir())
-            .hgPath(Util.getHgPath())
-            .build();
-
-    myRemoteRepository = myTempFiles.createTempDir();
-    Util.copyRepository(new File("mercurial-tests/testData/rep2"), myRemoteRepository);
-    MercurialSupportBuilder hgBuilder = mercurialSupport().withConfig(config);
-    MercurialVcsSupport vcs = hgBuilder.build();
-    myVcs = vcs;
-    myModInfoBuilder = new MercurialModificationInfoBuilder(vcs, hgBuilder.getHgRootFactory(), hgBuilder.getHgRepoFactory(), hgBuilder.getHgPathProvider());
-  }
-
-
-  public void should_return_commits_for_every_revision_in_state(HgVersion _) throws Exception {
-    VcsRoot root = vcsRoot().withUrl(myRemoteRepository.getAbsolutePath()).build();
-    final List<ChangeData> changes = new ArrayList<ChangeData>();
-    myVcs.syncRepository(root);
-    myModInfoBuilder.fetchChangesInfo(root, CheckoutRules.DEFAULT, Arrays.asList("505c5b9d01e6", "9ec402c74298"), new ChangesConsumer() {
-      public void consumeChange(@NotNull ChangeData change) {
-        changes.add(change);
-      }
-    });
-
-    for (ChangeData change : changes) {
-      if (change.getVersion().equals("505c5b9d01e6")) {
-        Assert.assertEquals(change.getParentRevisions(), Arrays.asList("78e67807f916"));
-      } else if (change.getVersion().equals("9ec402c74298")) {
-        Assert.assertEquals(change.getParentRevisions(), Arrays.asList("96b78d73081d"));
-      } else {
-        Assert.fail("Unexpected revision: " + change.getVersion());
-      }
-    }
-
-    assertEquals(2, changes.size());
-  }
-
-
-  public void should_return_commits_for_every_revision_in_state_parent_child(HgVersion _) throws Exception {
-    VcsRoot root = vcsRoot().withUrl(myRemoteRepository.getAbsolutePath()).build();
-    final List<ChangeData> changes = new ArrayList<ChangeData>();
-    myVcs.syncRepository(root);
-    myModInfoBuilder.fetchChangesInfo(root, CheckoutRules.DEFAULT, Arrays.asList("505c5b9d01e6", "9ec402c74298", "96b78d73081d"), new ChangesConsumer() {
-      public void consumeChange(@NotNull ChangeData change) {
-        changes.add(change);
-      }
-    });
-
-    for (ChangeData change : changes) {
-      if (change.getVersion().equals("505c5b9d01e6")) {
-        Assert.assertEquals(change.getParentRevisions(), Arrays.asList("78e67807f916"));
-      } else if (change.getVersion().equals("9ec402c74298")) {
-        Assert.assertEquals(change.getParentRevisions(), Arrays.asList("96b78d73081d"));
-      } else if (change.getVersion().equals("96b78d73081d")) {
-        Assert.assertEquals(change.getParentRevisions(), Arrays.asList("dec47d2d49bf"));
-      } else {
-        Assert.fail("Unexpected revision: " + change.getVersion());
-      }
-    }
-
-    assertEquals(3, changes.size());
-  }
-
-  public void should_return_commits_for_every_revision_in_state_parent_gap_child(HgVersion _) throws Exception {
-    VcsRoot root = vcsRoot().withUrl(myRemoteRepository.getAbsolutePath()).build();
-    final List<ChangeData> changes = new ArrayList<ChangeData>();
-    myVcs.syncRepository(root);
-    myModInfoBuilder.fetchChangesInfo(root, CheckoutRules.DEFAULT, Arrays.asList("505c5b9d01e6", "9ec402c74298", "dec47d2d49bf"), new ChangesConsumer() {
-      public void consumeChange(@NotNull ChangeData change) {
-        changes.add(change);
-      }
-    });
-
-
-    for (ChangeData change : changes) {
-      if (change.getVersion().equals("505c5b9d01e6")) {
-        Assert.assertEquals(change.getParentRevisions(), Arrays.asList("78e67807f916"));
-      } else if (change.getVersion().equals("9ec402c74298")) {
-        Assert.assertEquals(change.getParentRevisions(), Arrays.asList("96b78d73081d"));
-      } else if (change.getVersion().equals("dec47d2d49bf")) {
-        Assert.assertEquals(change.getParentRevisions(), Arrays.asList("1e620196c4b6"));
-      } else {
-        Assert.fail("Unexpected revision: " + change.getVersion());
-      }
-    }
-
-    assertEquals(3, changes.size());
-  }
-}
--- a/mercurial-tests/src/testng-via-cmd.xml	Tue Feb 02 18:52:25 2016 +0100
+++ b/mercurial-tests/src/testng-via-cmd.xml	Tue Feb 02 18:59:10 2016 +0100
@@ -38,7 +38,6 @@
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.MergeSupportTest"/>
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.TagsTest"/>
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.CommitsInfoBuilderSupportTest"/>
-      <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialModificationInfoBuilderTest"/>
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialUrlSupportTest"/>
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.PurgeTest"/>
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialCommitSupportTest"/>
--- a/mercurial-tests/src/testng.xml	Tue Feb 02 18:52:25 2016 +0100
+++ b/mercurial-tests/src/testng.xml	Tue Feb 02 18:59:10 2016 +0100
@@ -52,7 +52,6 @@
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.MergeSupportTest"/>
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.TagsTest"/>
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.CommitsInfoBuilderSupportTest"/>
-      <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialModificationInfoBuilderTest"/>
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialUrlSupportTest"/>
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.command.CommitsAndMountPointsCommandParserTest"/>
       <class name="jetbrains.buildServer.buildTriggers.vcs.mercurial.PurgeTest"/>