diff mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialAgentSideVcsSupport.java @ 935:eb3e0285ae52

TW-43138 Migrate to fresh auto checkout api
author Dmitry.Treskunov@UNIT-412.Labs.IntelliJ.Net
date Wed, 11 Nov 2015 21:03:31 +0300
parents 3db6c332fc3b
children 68160fb667b1
line wrap: on
line diff
--- a/mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialAgentSideVcsSupport.java	Tue Nov 10 21:27:07 2015 +0300
+++ b/mercurial-agent/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialAgentSideVcsSupport.java	Wed Nov 11 21:03:31 2015 +0300
@@ -56,8 +56,8 @@
 
   @NotNull
   @Override
-  public AgentCheckoutAbility canCheckout(@NotNull VcsRootEntry vcsRoot, @NotNull AgentRunningBuild build) {
-    CheckoutInfo info = new CheckoutInfo(myRepoFactory, new HgVcsRoot(vcsRoot.getVcsRoot()), vcsRoot.getCheckoutRules());
+  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) {
@@ -65,7 +65,7 @@
     }
 
     try {
-      for (IncludeRule rule : vcsRoot.getCheckoutRules().getRootIncludeRules()) {
+      for (IncludeRule rule : checkoutRules.getRootIncludeRules()) {
         MercurialIncludeRuleUpdater.checkRuleIsValid(rule);
       }
       return AgentCheckoutAbility.canCheckout();